1.0.4 • Published 6 years ago

@brikcss/timer v1.0.4

Weekly downloads
1
License
-
Repository
github
Last release
6 years ago

Timer

Simple timer utility to start, stop, check duration, and clear a timer. Works in Node, JS/UMD modules, or the browser.

Install

npm install @brikcss/timer --save-dev

Usage

timer.start(id)

Start a new or existing timer. Creates one if it doesn't exist. Returns the newly created timer object.

timer.stop(id)

Stop an existing timer. Returns the timer's duration as a string.

timer.duration(id)

Get the duration of a timer. Returns a string in ms or s.

timer.clear(id)

Clear / remove a timer from memory.

Environment support

NodeCLIUMDES ModuleBrowser
x
1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago