项目作者: bukinoshita

项目描述 :
Elegant instance execution time in ms
高级语言: JavaScript
项目地址: git://github.com/bukinoshita/log-ms.git
创建时间: 2017-06-19T21:41:03Z
项目社区:https://github.com/bukinoshita/log-ms

开源协议:MIT License

下载


log-ms Build Status

Elegant instance execution time in ms

Install

  1. $ npm install --save log-ms

Usage

  1. const logms = require('log-ms')
  2. const timer = logms()
  3. timer.start()
  4. setTimeout(() => console.log(`cool! ${timer.end()}`), 5000)
  5. // => cool [5s]

Demo

API

logms()

Instance

start()

Start the logms. Returns the instance.

end()

Stop the logms. Returns the instance.

License

MIT © Bu Kinoshita