timed

0.1.1 • Public • Published

timed

Simplifies high resolution timing for profiling

Usage exampe:

timed = require('timed');
 
//Start the timer
timed.reset();
 
setTimeout(function() {
  //should be about 1000 ms
  console.log('Elapsed: ' + timed.since() + ' ms');  
 
  timed.reset();  //timer starts again now from 0    
  setTimeout(function() {
    //This one should be about 1500 ms rounded to 3 decimal places
    console.log('Elapsed: ' + timed.rounded() + 'ms');
  }, 1500);
  
 
}, 1000);
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    10
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    10
  • 0.0.4
    1
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    1

Package Sidebar

Install

npm i timed

Weekly Downloads

12

Version

0.1.1

License

MIT

Last publish

Collaborators

  • runvnc