On Thu Jul 11 14:48:59 2024 +0000, Paul Gofman wrote:
Sorry for sounding Captain Obvious but depending on the Wine behaviour different from Windows is never a good idea. We didn't yet encounter an app which is confirmed depending on Windows sleep granularity, but if we will I personally don't see why won't we change this behaviour, even if it is not immediately trivial to do and will first require visiting some places in the code which might depend on that. There has to be a better way. That's not related to this MR, I didn't verify but I don't know that we really need that coarse timer. BTW did you try experimenting with waitable timers? Maybe (didn't test) waiting for them will yield a better time granularity on Windows.
Yeah, I’m aware that detecting Wine isn’t a good approach in general. I’ll probably move to a Unixlib just for sleeping (kinda silly but that’s the most reliable).
I already use waitable timers on Windows and they give 0.5ms precision from my tests. There are also other sources on the internet confirming the same thing [1](https://groups.google.com/a/chromium.org/g/scheduler-dev/c/0GlSPYreJeY?pli=1).