0.1.2 • Published 11 years ago

microwatch v0.1.2

Weekly downloads
13
License
-
Repository
-
Last release
11 years ago

microwatch

Stopwatch with microseconds (1/1000th of millisecond) resolution

Install

npm install microwatch

Usage

// microsecond microwatch
stopwatch = new require('microwatch')() // start() automatically called
stopwatch.start() // start watch at 0
duration  = stopwatch.now() // 1

// floating point microwatch in seconds
stopwatch = new require('microwatch')(true) // start() automatically called
stopwatch.start() // start watch at 0
duration  = stopwatch.now() // 0.000001

License

MIT