@@ -74,12 +74,12 @@ When this occurs, `_idleStart` is reliably different between `t1` and `t2`.
7474We can guarantee that multiple timers (with the same delay, usually `0`)
7575run together without any delays by making sure that their `_idleStart`s are the same,
7676because that's what's used to determine if a timer should be deferred or not.
77- Luckily, this is property is currently exposed to userland and mutable,
77+ Luckily, this property is currently exposed to userland and mutable,
7878so we can patch it.
7979
8080Another related trick we could potentially apply is making
8181a timer immediately be considered expired by doing `timer._idleStart -= 2`.
82- (the value must be more `1`, the delay that actually gets set for `setTimeout(cb, 0)`).
82+ (the value must be more than `1`, the delay that actually gets set for `setTimeout(cb, 0)`).
8383This makes node view this timer as "a 1ms timer scheduled 2ms ago",
8484meaning that it should definitely run in the next timer phase.
8585However, I'm not confident we know all the side effects of doing this,
@@ -156,7 +156,7 @@ export function createAtomicTimerGroup(delayMs = 0) {
156156 return timer
157157 }
158158
159- // NodeJS timers to have a `_idleStart` property, but it doesn't exist e.g. in Bun.
159+ // NodeJS timers have a `_idleStart` property, but it doesn't exist e.g. in Bun.
160160 // If it's not present, we'll warn and try to continue.
161161 try {
162162 if ( '_idleStart' in timer && typeof timer . _idleStart === 'number' ) {
0 commit comments