summaryrefslogtreecommitdiff
path: root/cli/js
diff options
context:
space:
mode:
authorKevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>2019-12-10 03:21:30 -0800
committerBert Belder <bertbelder@gmail.com>2019-12-10 12:21:30 +0100
commitec7f3ce1c27d7c2d231a75d6a4eea82867d7ad2b (patch)
tree5d918fd33136f061acc32c984d9a9bbe67bcbc89 /cli/js
parent4b9953b6ac9d07f9d54f2f29c8fa33c0abcdc906 (diff)
timer: due/now Math.max instead of min (#3477)
Diffstat (limited to 'cli/js')
-rw-r--r--cli/js/timers.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/js/timers.ts b/cli/js/timers.ts
index 24c9ebf9a..a13345c40 100644
--- a/cli/js/timers.ts
+++ b/cli/js/timers.ts
@@ -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.