dscape/lynx

timer diff calculation is wrong

Closed this issue · 0 comments

https://github.com/dscape/lynx/blob/master/lib/lynx.js#L181

Imagine start is 10 sec, 40 nano, and stop is 12 sec, 10 nano, the arithmetic above will result in a duration of 2 sec, -30 nano.

The code should just use process.hrtime to calculate the difference, correctly.