durations / 2.1.0 last updated a month ago created on Apr 23rd 2015
Install
npm install --save durations
Clone
git clone git@github.com:joeledwards/node-durations.git
dependencies
| main |
|
q | 1.4.1 | MIT |
|
|
browser-process-hrtime | 0.1.2 | BSD 2-Clause |
maintainers
versions
6 total
| 2.1.0 | a month ago | buzuli |
| 2.0.1 | a month ago | buzuli |
| 2.0.0 | 4 months ago | buzuli |
| 1.0.2 | 9 months ago | buzuli |
| 1.0.1 | a year ago | buzuli |
| 1.0.0 | a year ago | buzuli |
readme
Stopwatch
A nanosecond granularity (on Node.js) stopwatch with chainable control methods, and built-in formatting.
Timer
Times the execution of a function, and returns the duration.
Duration
Represents a duration with nanosecond granularity, and provides methods for converting to other granularities, and formatting the duration.
Installation
Usage
Compatibilty
The durations module uses the browser-process-hrtime module in order to
support both Node.js and browsers. When using Node.js, the nanosecond-granulatiry
process.hrtime() function is used. The best substitution is selected when
in the browser such that consistency is maintained even if time granularity
cannot be.