Skip to content

Simple timer for use in application metrics

Notifications You must be signed in to change notification settings

andrewstart/metrics-timer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple timer for use in application metrics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%