diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-16 20:31:59 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-16 20:31:59 -0300 |
| commit | 82fca5c9f29124f37f6dcd08e73e6999ce44a69d (patch) | |
| tree | b3d5487659aa933d47699e5e420fa6140b0b75f3 /src/host/timeline.zig | |
| parent | e77b01d4b5504cea08a3f88cf8502897d868a1d3 (diff) | |
| download | sketchbook-82fca5c9f29124f37f6dcd08e73e6999ce44a69d.tar.gz sketchbook-82fca5c9f29124f37f6dcd08e73e6999ce44a69d.zip | |
Add display-paced frame timing and presentation feedback in Zig
Diffstat (limited to 'src/host/timeline.zig')
| -rw-r--r-- | src/host/timeline.zig | 2 |
1 files changed, 2 insertions, 0 deletions
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; } } |
