Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Upstream bug: uv_hrtime() return non-incremental value under windows #18

Closed
mschauer opened this issue Oct 18, 2013 · 5 comments
Closed

Comments

@mschauer
Copy link

I was puzzling why the elapsed macro is not working correctly under windows.

It turns out that this is an upstream bug in libuv, I leave a note here if somebody runs into the same problem: uv_hrtime can return non-incremental values under windows resulting in underflow of (time_ns()-t0)/1e9 in the elapsed macro.

Compare joyent/libuv#850.

@StefanKarpinski
Copy link

Excellent sleuthing tracking down the cause to that libuv bug.

@vtjnash
Copy link
Collaborator

vtjnash commented Oct 18, 2013

Since that has a patch, we can just apply that to our local branch and get the fix without waiting for upstream

@timholy
Copy link

timholy commented Oct 18, 2013

Long ago I had to fix what was basically this same libuv bug on multiple Unix systems; I guess I didn't fix the Windows version at that time because timers are different on Windows, I lacked a Windows system to test on, and this was back before we had a Windows port. But with hindsight...

@mschauer
Copy link
Author

mschauer commented Dec 2, 2013

Fixed upstream, joyent#850

@vtjnash vtjnash closed this as completed Jan 1, 2014
@vtjnash
Copy link
Collaborator

vtjnash commented Jan 1, 2014

pulled in the upstream fix in 5bf16a9

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants