We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d05712 commit 8d2d4ffCopy full SHA for 8d2d4ff
src/browser/page.zig
@@ -313,7 +313,13 @@ pub const Page = struct {
313
return;
314
}
315
_ = try scheduler.runLowPriority();
316
- std.time.sleep(std.time.ns_per_ms * ms);
+
317
+ // We must use a u64 here b/c ms is a u32 and the
318
+ // conversion to ns can generate an integer
319
+ // overflow.
320
+ const _ms: u64 = @intCast(ms);
321
322
+ std.time.sleep(std.time.ns_per_ms * _ms);
323
break :SW;
324
325
0 commit comments