[Webkit-unassigned] [Bug 225610] performance.now() does not tick during system sleep

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 21 18:13:15 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=225610

--- Comment #7 from Jonathan Mayer <webkit-bugzilla at mayerware.com> ---
(In reply to Alex Christensen from comment #6)
> I was looking into something else and found something related to this
> problem: Performance::now calls MonotonicTime::now which calls
> mach_absolute_time.  If I understand correctly, this is a request for a
> timer that uses mach_continuous_time instead.

Using clock_gettime / clock_gettime_nsec_np with CLOCK_MONOTONIC might be preferable to CLOCK_MONOTONIC_RAW (which is equivalent to mach_continuous_time). CLOCK_MONOTONIC allows for small monotonic adjustments (e.g., NTP oscillator corrections) and CLOCK_MONOTONIC_RAW doesn't. The result can be an unexpected drift from the system clock. Chrome currently has this very issue (with mach_absolute_time), and in a quick check, I also saw clock drift in Safari on macOS.

https://bugs.chromium.org/p/chromium/issues/detail?id=948384

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210522/9103ee7d/attachment.htm>


More information about the webkit-unassigned mailing list