1.0.3 • Published 11 years ago
clck v1.0.3
clck.js 
$ npm install --save clck
var clock = require('clck');
// Start the timer.
clock.start('test');
// All the timers we've started are exposed via
// console.log(clock.timers);
// After a while, check how long it's been.
setTimeout(function(){
console.log('"test" has been running for %d milliseconds', clock.time('test'));
}, 5000);
// Later, stop the timer (and execute a callback with the duration).
setTimeout(function(){
clock.stop('test', function(duration, id){
console.log('"%s" took %d milliseconds', id, duration);
});
}, 10000);