From 82fca5c9f29124f37f6dcd08e73e6999ce44a69d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 16 Nov 2026 20:31:59 -0300 Subject: Add display-paced frame timing and presentation feedback in Zig --- src/host/timeline.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/host/timeline.zig') diff --git a/src/host/timeline.zig b/src/host/timeline.zig index 8a5448a..b52c74d 100644 --- a/src/host/timeline.zig +++ b/src/host/timeline.zig @@ -295,6 +295,7 @@ test "frames are whole: input waits for its tick, live and in playback" { try t.capture(&frame); // Live update sees the recorded times. try std.testing.expectEqual(@as(u64, k * 10_000_000 + 5_000_000), frame[1].time); + try std.testing.expectEqual(abi.Event.tick(0, 16_666_667).tickDt(), frame[1].tickDt()); } const r = t.bank.recording(0); r.events[r.count] = .{ .kind = .mouse_move, .time = 40_000_000 }; @@ -313,6 +314,7 @@ test "frames are whole: input waits for its tick, live and in playback" { var it = frames(events); while (it.next()) |frame| { try std.testing.expectEqual(@as(usize, 2), frame.len); + try std.testing.expectEqual(abi.Event.tick(0, 16_666_667).tickDt(), frame[1].tickDt()); delivered += 1; } } -- cgit v1.3