summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/pdf_scroll_bench.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/pdf_scroll_bench.zig b/test/pdf_scroll_bench.zig
index bb4640f7..595037ae 100644
--- a/test/pdf_scroll_bench.zig
+++ b/test/pdf_scroll_bench.zig
@@ -277,9 +277,15 @@ fn measure(config: Config, plan: Plan) !Result {
var visual: u64 = 0x7061_7264_6573_5343;
var shown: u64 = 0;
var total: u64 = 0;
+ // The core's clock a frame on at each, as a shell's loop moves it
+ // (its glide and a fling are on that clock).
+ var now: u64 = std.time.ns_per_s;
+ core.advance(now);
for (0..plan.frames) |frame| {
const button: pardes.Mouse.Button = if (plan.scenario == .fling_reverse and frame >= plan.down_frames) .wheel_up else .wheel_down;
const started = nowNs();
+ now += pardes.frame_ns;
+ core.advance(now);
for (0..ticks) |_| core.update(.{ .mouse = .{ .button = button, .kind = .press, .col = rect.x + rect.w / 2, .row = rect.y + rect.h / 2, .amount = config.turn } });
_ = arena.reset(.retain_capacity);
const surface = try core.render(arena.allocator());