Package Exports
- node-stopwatch
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 (node-stopwatch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-stopwatch
Usage
var Stopwatch = require("node-stopwatch").Stopwatch;
var stopwatch = Stopwatch.create();
stopwatch.start();
/*
my long task here
*/
console.log("ticks: " + stopwatch.elapsedTicks);
console.log("milliseconds: " + stopwatch.elapsedMilliseconds);
console.log("seconds: " + stopwatch.elapsed.seconds);
console.log("minutes: " + stopwatch.elapsed.minutes);
console.log("hours: " + stopwatch.elapsed.hours);
//stop it now
stopwatch.stop();Methods
start();
stop();
reset();
restart();Installation
Installing stopwacht
$ npm install node-stopwatch