Based on the Linux CLOCK_MONOTONIC definition  the monotonic clock does not count ticks when the system is suspended.
The POSIX definition of
CLOCK_MONOTONIC does not mention if it should increase or not during suspend. Not sure if macOS or xxxBSD made the same choice as Linux. Apparently on some BSD (in this case macOS) it seems to be the other way around: https://www.manpagez.com/man/3/clock_gettime_nsec_np/
CLOCK_MONOTONIC clock that increments monotonically, tracking the time since an arbitrary point, and will continue to incre- ment while the system is asleep.
The proper value to use should be
CLOCK_UPTIME_RAW clock that increments monotonically, in the same man- ner as CLOCK_MONOTONIC_RAW, but that does not incre- ment while the system is asleep. The returned value is identical to the result of mach_absolute_time() after the appropriate mach_timebase conversion is applied.
On Windows we have clock sources that vary during suspend, and some that don't.
- added the same clarification for
- rebased on master to get faster snap builds