mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.Io.Threaded: correct clockToPosix for FreeBSD
This commit is contained in:
parent
ef55dcae67
commit
cc751c01f1
1 changed files with 3 additions and 0 deletions
|
|
@ -5006,6 +5006,9 @@ fn clockToPosix(clock: Io.Clock) posix.clockid_t {
|
||||||
},
|
},
|
||||||
.boot => switch (native_os) {
|
.boot => switch (native_os) {
|
||||||
.macos, .ios, .watchos, .tvos => posix.CLOCK.MONOTONIC_RAW,
|
.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,
|
else => posix.CLOCK.BOOTTIME,
|
||||||
},
|
},
|
||||||
.cpu_process => posix.CLOCK.PROCESS_CPUTIME_ID,
|
.cpu_process => posix.CLOCK.PROCESS_CPUTIME_ID,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue