Closed
Description
On GNU/Linux since 2.6.39 clock_gettime
supports CLOCK_BOOTTIME
, which is equivalent to CLOCK_MONOTONIC
except that it also accounts for time when the computer is asleep. We should prefer CLOCK_BOOTTIME
to CLOCK_MONOTONIC
when it is available. That will permit time.Time.Sub
to return the correct value across periods when the computer has gone to sleep.
See #23178.