1.0.1 • Published 8 years ago

node-hrstopwatch v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

node-stopwatch

A high resolution stopwatch using the hrtime function of the Node.JS process object which returns duration in nanoseconds. https://nodejs.org/api/process.html#process_process_hrtime

===Usage===

To use the stop watch in your code:

var Stopwatch = require('node-stopwatch');

var stopwatch = new Stopwatch(); stopwatch.start();

//Do some task

stopwatch.stop();

var duration = stopwatch.getDuration(); console.log(duration);

The console will output the duration in nanoseconds.