Commit cc751c01f1

Andrew Kelley <andrew@ziglang.org>
2025-10-27 22:59:42
std.Io.Threaded: correct clockToPosix for FreeBSD
1 parent ef55dca
Changed files (1)
lib
lib/std/Io/Threaded.zig
@@ -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,