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

Method _runTo

packages/injected/src/clock.ts:178–196  ·  view source on GitHub ↗
(to: Ticks)

Source from the content-addressed store, hash-verified

176 }
177
178 private async _runTo(to: Ticks) {
179 to = Math.ceil(to) as Ticks;
180
181 if (this._now.ticks > to)
182 return;
183
184 let firstException: Error | undefined;
185 while (true) {
186 const result = await this._callFirstTimer(to);
187 if (!result.timerFound)
188 break;
189 firstException = firstException || result.error;
190 }
191
192 this._advanceNow(to);
193
194 if (firstException)
195 throw firstException;
196 }
197
198 async pauseAt(time: number): Promise<number> {
199 this._replayLogOnce();

Callers 3

runForMethod · 0.95
_updateRealTimeTimerMethod · 0.95
_innerFastForwardToMethod · 0.95

Calls 2

_callFirstTimerMethod · 0.95
_advanceNowMethod · 0.95

Tested by

no test coverage detected