mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 23:34:47 -05:00
timer: due/now Math.max instead of min (#3477)
This commit is contained in:
parent
4b9953b6ac
commit
ec7f3ce1c2
1 changed files with 1 additions and 1 deletions
|
@ -192,7 +192,7 @@ function firePendingTimers(): void {
|
|||
pendingScheduleTimers = [];
|
||||
// Reschedule for next round of timeout.
|
||||
const nextDueNode = dueTree.min();
|
||||
const due = nextDueNode && Math.min(nextDueNode.due, now);
|
||||
const due = nextDueNode && Math.max(nextDueNode.due, now);
|
||||
setOrClearGlobalTimeout(due, now);
|
||||
} else {
|
||||
// Fire a single timer and allow its children microtasks scheduled first.
|
||||
|
|
Loading…
Reference in a new issue