Closed Bug 541185 Opened 10 years ago Closed 10 years ago
Stamp should better deal with low-resolution "HW" clocks
In writing this code, I assumed that the time for a syscall (or vsyscall) was greater than the clock's actual resolution. On Neil's VM, the actual clock resolution is 10ms, which breaks this assumption. Neil says that his clock_getres() reports 10ms, which suggests the following modified algorithm: (1) Run current algorithm. If |candidate| is > 0ns, stop. (2) |candidate == 0ns| => impossibly-high-resolution or low-resolution. Ask clock_getres(). If clock_getres() > 0ns, stop. (3) Set resolution to 1ms (NSPR fallback). Pretty simple modification.
Assignee: nobody → jones.chris.g
Attachment #429582 - Flags: review?(roc)
Attachment #429582 - Flags: review?(roc) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
10 years ago
Duplicate of this bug: 549178
You need to log in before you can comment on or make changes to this bug.