()
| 33 | // matchAll call runs to completion (or throws) before the next, and the |
| 34 | // previous value is restored in a finally. |
| 35 | let _matchDeadline: number | undefined = undefined; |
| 36 | let _matchTick = 0; |
| 37 | function tickDeadline(): void { |
| 38 | // amortize Date.now() over 1024 steps (same stride as the engine loops) |
| 39 | if ((++_matchTick & 0x3ff) === 0) checkDeadline(_matchDeadline); |
| 40 | } |
| 41 |