node-stopwatch

0.0.1 • Public • Published

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

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i node-stopwatch

    Weekly Downloads

    496

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • mgentile