jw-timer

1.0.0 • Public • Published

jw-timer

Simple timer class

USAGE:

var timer = require('jw-timer');

//this takes 250 milliseconds
someLongFunction(); 
timer.lap('Did some long function');

//this takes 1250 milliseconds
someOtherLongFunction(); 
timer.lap('Did more slow stuff');

//print the report
console.log(timer.report());

OUTPUT:

{
    "total: 1500",
    "Did some long function": 250,
    'Did more slow stuff': 1250
}

Readme

Keywords

Package Sidebar

Install

npm i jw-timer

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

40.3 kB

Total Files

6

Last publish

Collaborators

  • jonwyett