diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-10-27 14:59:42 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-10-29 06:20:51 -0700 |
| commit | cc751c01f13658280bc48905261f316b9b58b718 (patch) | |
| tree | 824ed251d3dc5741d33de319eb3d4b45d72c2553 /lib/std | |
| parent | ef55dcae675dd2048e5e404eb8bb6833d153f653 (diff) | |
| download | zig-cc751c01f13658280bc48905261f316b9b58b718.tar.gz zig-cc751c01f13658280bc48905261f316b9b58b718.zip | |
std.Io.Threaded: correct clockToPosix for FreeBSD
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/Io/Threaded.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/std/Io/Threaded.zig b/lib/std/Io/Threaded.zig index 449f2a3a32..c078852899 100644 --- a/lib/std/Io/Threaded.zig +++ b/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, |
