MCPcopy
hub / github.com/microsoft/playwright / _takeFirstTimer

Method _takeFirstTimer

packages/injected/src/clock.ts:341–353  ·  view source on GitHub ↗
(beforeTick?: number)

Source from the content-addressed store, hash-verified

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);

Callers 1

_callFirstTimerMethod · 0.95

Calls 4

_firstTimerMethod · 0.95
_advanceNowMethod · 0.95
shiftTicksFunction · 0.85
deleteMethod · 0.65

Tested by

no test coverage detected