Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 371 Bytes

README.md

File metadata and controls

25 lines (15 loc) · 371 Bytes

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);
});