Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 538 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 538 Bytes

Timer

simple timer for javascript

##Installation:

in browser:

include timer would append a function called createTimer under window namespace.

in nodeJS

require the file and get createTimer function.

var createTimer = require(__dirname + '/timer');

##Usage:

var timer = window.createTimer();
timer.start();
// do some stuff to be measured here.
// ...
// ...

// stop the timer and get result
timer.stop();
console.log('total time elasped: ' + timer.getTimeInterval());