Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/browser/page.zig
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,13 @@ pub const Page = struct {
return;
}
_ = try scheduler.runLowPriority();
std.time.sleep(std.time.ns_per_ms * ms);

// We must use a u64 here b/c ms is a u32 and the
// conversion to ns can generate an integer
// overflow.
const _ms: u64 = @intCast(ms);

std.time.sleep(std.time.ns_per_ms * _ms);
break :SW;
}

Expand Down
Loading