| ... | @@ -5009,7 +5009,12 @@ fn clockToPosix(clock: Io.Clock) posix.clockid_t { | ... | @@ -5009,7 +5009,12 @@ fn clockToPosix(clock: Io.Clock) posix.clockid_t { |
| 5009 | // On freebsd derivatives, use MONOTONIC_FAST as currently there's | 5009 | // On freebsd derivatives, use MONOTONIC_FAST as currently there's |
| 5010 | // no precision tradeoff. | 5010 | // no precision tradeoff. |
| 5011 | .freebsd, .dragonfly => posix.CLOCK.MONOTONIC_FAST, | 5011 | .freebsd, .dragonfly => posix.CLOCK.MONOTONIC_FAST, |
| 5012 | else => posix.CLOCK.BOOTTIME, | 5012 | // On linux, use BOOTTIME instead of MONOTONIC as it ticks while |
| | 5013 | // suspended. |
| | 5014 | .linux => posix.CLOCK.BOOTTIME, |
| | 5015 | // On other posix systems, MONOTONIC is generally the fastest and |
| | 5016 | // ticks while suspended. |
| | 5017 | else => posix.CLOCK.MONOTONIC, |
| 5013 | }, | 5018 | }, |
| 5014 | .cpu_process => posix.CLOCK.PROCESS_CPUTIME_ID, | 5019 | .cpu_process => posix.CLOCK.PROCESS_CPUTIME_ID, |
| 5015 | .cpu_thread => posix.CLOCK.THREAD_CPUTIME_ID, | 5020 | .cpu_thread => posix.CLOCK.THREAD_CPUTIME_ID, |