mocking lib for process.hrtime
Want to see pretty graphs? Log in now!
npm install hrtimemock
|4||downloads in the last week|
|7||downloads in the last month|
|Last Published By|
|Version||0.0.2 last updated 5 months ago|
|Keywords||hrtime, process.hrtime, high resolution timer, mock|
hrtimemock is a mocking function that causes
process.hrtime to output what ever time should have elapsed.
process.hrtime and for the second call returns the elapsed time specified by
mstime in the familiar array form.
mstimetime in milliseconds
var hrtimemock = require('hrtimemock'); hrtimemock(1000); var a = process.hrtime(); var elapsed = process.hrtime(a); console.log(elapsed); //will output [1,0]
Works only for a pair of
After that it has to be called again.