On Sun, 7 Jun 2026 at 08:17, Greg Troxel <[email protected]> wrote:

> If Linux's CLOCK_MONOTONIC does not increase across suspension, then I
> would say it does not comply with POSIX and should be fixed.  I might be
> off here, not having passed the POSIX Language Lawyer bar exam.

I'm pretty sure they know.  They're just not admitting it :-)
https://lore.kernel.org/all/[email protected]/

Note the last sentence in:

_This clock represents the monotonic clock for the system. For this
clock, the value returned by clock_gettime() represents the amount of
time (in seconds and nanoseconds) since an unspecified point in the
past (for example, system start-up time, or the Epoch). This point
does not change after system start-up time._

-> stopping the clock during a suspend moves the starting point

https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_gettime.html

Reply via email to