November 25, 2019 2:54 AM, "Huw Davies" huw@codeweavers.com wrote:
On Sun, Nov 24, 2019 at 07:39:58PM -0600, Chip Davis wrote:
Based on a patch by Andrew Eikum.
Linux's CLOCK_MONOTONIC(_RAW) and macOS's mach_absolute_time all stop counting when the computer goes to sleep/suspend/hibernate/etc. However, Windows's GetTickCount does not stop counting. Linux's CLOCK_BOOTTIME matches Windows's behavior, as does macOS's mach_continuous_time.
However, CLOCK_BOOTTIME is changed by adjtime(3) which GetTickCount() shouldn't be. I guess what we really want is a CLOCK_BOOTTIME_RAW...
So there's currently no clock on Linux that does exactly what we want? That's just grand...
Chip