Skip to content

mauriciogentile/node-stopwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A stopwatch utility for node.js apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors