node-stopwatch

A stopwatch utility for node.js apps

Stats

StarsIssuesVersionUpdatedCreatedSize
node-stopwatch
0.0.19 years ago9 years agoMinified + gzip package size for node-stopwatch in KB

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.