std.Io.Threaded: correct clockToPosix for FreeBSD

This commit is contained in:
Andrew Kelley 2025-10-27 14:59:42 -07:00
parent ef55dcae67
commit cc751c01f1

View file

@ -5006,6 +5006,9 @@ fn clockToPosix(clock: Io.Clock) posix.clockid_t {
},
.boot => switch (native_os) {
.macos, .ios, .watchos, .tvos => posix.CLOCK.MONOTONIC_RAW,
// On freebsd derivatives, use MONOTONIC_FAST as currently there's
// no precision tradeoff.
.freebsd, .dragonfly => posix.CLOCK.MONOTONIC_FAST,
else => posix.CLOCK.BOOTTIME,
},
.cpu_process => posix.CLOCK.PROCESS_CPUTIME_ID,