process.hrtime() (link) provides the elapsed time in a high resolution (nanoseconds) on node.
when using the sinon timer hrtime is not mocked so that tests that rely on clock.tick will fail.
Should it be stubbed, though? If so, the clock needs the ability to tick nanoseconds as well, e.g. clock.tick(1, 23) (to match the hrtime API). Thoughts?
i think one problem is that process.hrtime doesn't provide an absolute time value but an relative one. so the main use case is for measuring timespans between intervals. don't know how good that fits into the sinon concept...
I don't think the relative aspect matters. It could always start at 0. I'll keep this open, and add it, but I think it will not be stubbed by default. However, it could be enabled for
sinon.useFakeTimers("setTimeout", "clearTimeout", "hrtime");
This will not be part of the fake timers in Sinon - I just don't see enough use cases. If you really need to stub this, use sinon.stub(process, hrtime).returns(500).