artificer/lib/system_clock.zig

13 lines
248 B
Zig

const std = @import("std");
const Clock = @This();
pub fn sleep(self: *Clock, nanoseconds: u64) void {
_ = self;
std.time.sleep(nanoseconds);
}
pub fn nanoTimestamp(self: Clock) i128 {
_ = self;
return std.time.nanoTimestamp();
}