diff options
| author | Chris Boesch <48591413+chrboesch@users.noreply.github.com> | 2025-02-01 07:53:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-01 06:53:57 +0000 |
| commit | 58c00a829e8acf438b91e9f7e1729ce79be722fa (patch) | |
| tree | 21a7941f28fe1aea30c2591d116ad09334b34c8d /lib/std/Thread | |
| parent | c44be99f1abff2ab67d69964efecca380b96219e (diff) | |
| download | zig-58c00a829e8acf438b91e9f7e1729ce79be722fa.tar.gz zig-58c00a829e8acf438b91e9f7e1729ce79be722fa.zip | |
std.posix: Use separate clock ID enums for clock_gettime() and timerfd_create() (#22627)
Diffstat (limited to 'lib/std/Thread')
| -rw-r--r-- | lib/std/Thread/Futex.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Thread/Futex.zig b/lib/std/Thread/Futex.zig index fc02b8407c..c18caec7a6 100644 --- a/lib/std/Thread/Futex.zig +++ b/lib/std/Thread/Futex.zig @@ -543,7 +543,7 @@ const PosixImpl = struct { // This can be changed with pthread_condattr_setclock, but it's an extension and may not be available everywhere. var ts: c.timespec = undefined; if (timeout) |timeout_ns| { - std.posix.clock_gettime(c.CLOCK.REALTIME, &ts) catch unreachable; + ts = std.posix.clock_gettime(c.CLOCK.REALTIME) catch unreachable; ts.sec +|= @as(@TypeOf(ts.sec), @intCast(timeout_ns / std.time.ns_per_s)); ts.nsec += @as(@TypeOf(ts.nsec), @intCast(timeout_ns % std.time.ns_per_s)); |
