mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 16:28:58 +00:00
don't log 'long timeout ignored' during testing
This commit is contained in:
@@ -273,7 +273,9 @@ pub const Window = struct {
|
|||||||
fn createTimeout(self: *Window, cbk: Function, delay_: ?u32, page: *Page, opts: CreateTimeoutOpts) !u32 {
|
fn createTimeout(self: *Window, cbk: Function, delay_: ?u32, page: *Page, opts: CreateTimeoutOpts) !u32 {
|
||||||
const delay = delay_ orelse 0;
|
const delay = delay_ orelse 0;
|
||||||
if (delay > 5000) {
|
if (delay > 5000) {
|
||||||
log.warn(.user_script, "long timeout ignored", .{ .delay = delay, .interval = opts.repeat });
|
if (!@import("builtin").is_test) {
|
||||||
|
log.warn(.user_script, "long timeout ignored", .{ .delay = delay, .interval = opts.repeat });
|
||||||
|
}
|
||||||
// self.timer_id is u30, so the largest value we can generate is
|
// self.timer_id is u30, so the largest value we can generate is
|
||||||
// 1_073_741_824. Returning 2_000_000_000 makes sure that clients
|
// 1_073_741_824. Returning 2_000_000_000 makes sure that clients
|
||||||
// can call cancelTimer/cancelInterval without breaking anything.
|
// can call cancelTimer/cancelInterval without breaking anything.
|
||||||
|
|||||||
Reference in New Issue
Block a user