ReadonlyfastAdvance the clock by jumping forward in time. Only fires due timers at most once. This is equivalent to user closing the laptop lid for a while and reopening it later, after given time.
ReadonlyinstallInstall fake implementations for time-related functions.
ReadonlypauseAdvance the clock by jumping forward in time and pause the time.
ReadonlyresumeResumes timers. Once this method is called, time resumes flowing, timers are fired as usual.
ReadonlyrunAdvance the clock, firing all the time-related callbacks.
ReadonlysetMakes Date.now and new Date() return fixed fake time at all times, keeps all the timers running.
ReadonlysetSets system time, but does not trigger any timers.
ReadonlyuseA generic utility to execute any promise-based method on the underlying Playwright Clock.
Can be used to access any Clock functionality not directly exposed by this service.
A function that takes the Playwright Clock and returns a Promise.
An effect that wraps the promise and returns its result.
Interface for a Playwright clock.