aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread/ResetEvent.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2021-09-13 23:12:19 +0200
committerJakub Konka <kubkon@jakubkonka.com>2021-09-13 23:40:38 +0200
commita38b636045c0384faad1565d47dfbf774821021e (patch)
treea78193473fd5b725feaf2762b10cfc189a26a325 /lib/std/Thread/ResetEvent.zig
parent760241ce50eaa9031339f6b591358b53f5797486 (diff)
parentf011f13933b72f4d63a5f635c7646b68beee726e (diff)
downloadzig-a38b636045c0384faad1565d47dfbf774821021e.tar.gz
zig-a38b636045c0384faad1565d47dfbf774821021e.zip
Merge remote-tracking branch 'origin/master' into zld-incr
Diffstat (limited to 'lib/std/Thread/ResetEvent.zig')
-rw-r--r--lib/std/Thread/ResetEvent.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Thread/ResetEvent.zig b/lib/std/Thread/ResetEvent.zig
index d9304dd70b..d85cf7f133 100644
--- a/lib/std/Thread/ResetEvent.zig
+++ b/lib/std/Thread/ResetEvent.zig
@@ -152,7 +152,7 @@ pub const PosixEvent = struct {
pub fn timedWait(ev: *PosixEvent, timeout_ns: u64) TimedWaitResult {
var ts: os.timespec = undefined;
var timeout_abs = timeout_ns;
- os.clock_gettime(os.CLOCK_REALTIME, &ts) catch return .timed_out;
+ os.clock_gettime(os.CLOCK.REALTIME, &ts) catch return .timed_out;
timeout_abs += @intCast(u64, ts.tv_sec) * time.ns_per_s;
timeout_abs += @intCast(u64, ts.tv_nsec);
ts.tv_sec = @intCast(@TypeOf(ts.tv_sec), @divFloor(timeout_abs, time.ns_per_s));