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

Method _firstTimer

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

Source from the content-addressed store, hash-verified

328 }
329
330 private _firstTimer(beforeTick?: number): Timer | null {
331 let firstTimer: Timer | null = null;
332
333 for (const timer of this._timers.values()) {
334 const isInRange = beforeTick === undefined || timer.callAt <= beforeTick;
335 if (isInRange && (!firstTimer || compareTimers(firstTimer, timer) === 1))
336 firstTimer = timer;
337 }
338 return firstTimer;
339 }
340
341 private _takeFirstTimer(beforeTick?: number): Timer | null {
342 const timer = this._firstTimer(beforeTick);

Callers 2

_updateRealTimeTimerMethod · 0.95
_takeFirstTimerMethod · 0.95

Calls 2

compareTimersFunction · 0.85
valuesMethod · 0.45

Tested by

no test coverage detected