Package Exports
- hr-watch
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hr-watch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
hr-watch
A high-resoultion stopwatch for Node.
v1.0.1
API
start
starts timer
stop([unit])
stops timer
returns elapsed time
lap
marks a lap, starts a new lap timer
returns previous lap time (unit)
read([unit])
gets current timer
- when running laps, returns an array of laps
- when not running laps, returns the current elapsed time
clear
clears out timer
reset
stops timer and clears
unit(unit)
sets returned unit (ns, ms, s), by default this is ns
TODO
- multiple named timers
- improve README
kickstarted by npm-boom