diff options
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)); |
