(timestamp: number)
| 349 | const initialMonotonicNanos = currentMonotonicNanos |
| 350 | const endTimestamp = step(currentTimestamp) |
| 351 | const advanceTo = (timestamp: number) => { |
| 352 | const deltaMillis = timestamp - currentTimestamp |
| 353 | if (deltaMillis > 0 && Number.isFinite(deltaMillis)) { |
| 354 | currentMonotonicNanos += BigInt(Math.round(deltaMillis * 1_000_000)) |
| 355 | } |
| 356 | if (Number.isFinite(timestamp)) { |
| 357 | currentWallNanos = millisToNanos(timestamp) |
| 358 | } |
| 359 | currentTimestamp = timestamp |
| 360 | } |
| 361 | while (Arr.isArrayNonEmpty(sleeps)) { |
| 362 | if (Arr.lastNonEmpty(sleeps).timestamp > endTimestamp) break |
| 363 | const entry = sleeps.pop()! |
no test coverage detected