metrics-timer

2019-06-13 admin

metrics-timer是什么

什么是metrics-timer,Simple timer for use in application metrics

metrics-timer使用教程帮助文档

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

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-67221.html

文章标题:metrics-timer

回到顶部