On Tue Feb 4 19:20:12 2025 +0000, Brendan Shanks wrote:
I looked around for this but couldn't find anything, [WebKit added support](https://github.com/WebKit/WebKit/commit/d581c36c26fce240b2258214d829a2ced062...) but just says that it has "coarse-grained resolution" and "we can use this when we do not care about high resolution".
I did a bunch of tests on this a while ago and it is in general just lagging a bit behind `mach_continuous_time` with a bunch of jitter, due to more lax memory barriers IIRC.
In any case, the error was in the order of 100 nanoseconds at max (and much less when looking at the errors of the values relative to each other, assuming `mach_continuous_time` as ground truth). It was way more precision than needed for the 1 ms windows system timer precision.
But you are right in that there is almost nothing out there about the `*_aproximate_*` variants introduced wth 10.12, which is also probably due to Apple's (non-existent) documentation regarding it. They are part of the public API though, and probably going nowhere (hopefully).
I stumbled upon them when searching for the equivalent of `CLOCK_REALTIME_COARSE`.