Why does the second `untilNow` take 5us extra?
Ziggit
Why does the second `untilNow` take 5us extra?
This Zig 0.16 example: const std = @import("std"); pub fn main(init: std.process.Init) !void { const io = init.io; const clk: std.Io.Clock = .awake; const start_time = clk.now(io); const t1 = start_time.untilNow(io, clk); const t2 = start_time.untilNow(io, clk); const t3 = start_time.untilNow(io, clk); const t4 = start_time.untilNow(io, clk); std.debug.print("{:>5}\n", .{@abs(t1.nanoseconds)}); std.debug.print("{:>5}\n", .{@abs(t2.nanoseconds)}); std.d...
0 comments
No comments yet.