metrics-timer
v0.1.0
Published
Simple timer for use in application metrics
Downloads
41
Readme
Metrics Timer
Simple timer for use in application metrics
Example Usage
var timer = require('metrics-timer');
var myEvent = require('foo');
myEvent.on('connect', function(id) {
timer.start(id);
});
myEvent.on('disconnect', function(id) {
var eventTime = timer.stop(id);
// outputs milliseconds
console.log(eventTime);
});