(beforeTick?: number)
| 339 | } |
| 340 | |
| 341 | private _takeFirstTimer(beforeTick?: number): Timer | null { |
| 342 | const timer = this._firstTimer(beforeTick); |
| 343 | if (!timer) |
| 344 | return null; |
| 345 | |
| 346 | this._advanceNow(timer.callAt); |
| 347 | |
| 348 | if (timer.type === TimerType.Interval) |
| 349 | timer.callAt = shiftTicks(timer.callAt, timer.delay); |
| 350 | else |
| 351 | this._timers.delete(timer.id); |
| 352 | return timer; |
| 353 | } |
| 354 | |
| 355 | private async _callFirstTimer(beforeTick: number): Promise<{ timerFound: boolean, error?: Error }> { |
| 356 | const timer = this._takeFirstTimer(beforeTick); |
no test coverage detected