0.0.1 • Published 9 years ago

elapsed-time v0.0.1

Weekly downloads
2,225
License
MIT
Repository
github
Last release
9 years ago

elapsed-time

build status Coverage Status Dependency status

NPM js-standard-style

Installation

npm install elapsed-time

Examples

var ElapsedTime = require('elapsed-time')
var et = ElapsedTime.new().start()
setTimeout(function () {
  console.log(et.getValue()) // should print ~ 10ms
}, 10)

API

new

you can use static new instead new keyword

return: ElapsedTime

setDefaultFormatter

  • function formatter

constructor

start

return: ElapsedTime

pause

return: ElapsedTime

sleep

  • number timeout

return: ElapsedTime

reset

return: ElapsedTime

getRawValue

return: number

getValue

return: number

License

Code released under the MIT license.