Implements the Date object but using this clock to provide the correct time.
Maximum number of timers that will be run when calling runAll().
Current clock time.
Mimics performance.now().
Don't know what this prop is for, but it was included in the clocks that createClock
or
install
return (it is never used in the code, for now).
Cancel animation frame request.
The id returned from requestAnimationFrame method.
Clears a timer, as long as it was created using requestIdleCallback.
Timer ID or object.
Clears a timer, as long as it was created using setImmediate.
Timer ID or object.
Clears a timer, as long as it was created using setInterval.
Timer ID or object.
Clears a timer, as long as it was created using setTimeout.
Timer ID or object.
Get the number of waiting timers.
number of waiting timers.
Advances the clock to the the moment of the first scheduled timer, firing it.
Fake milliseconds since the unix epoch.
Advances the clock to the the moment of the first scheduled timer, firing it.
Also breaks the event loop, allowing any scheduled promise callbacks to execute before running the timers.
Fake milliseconds since the unix epoch.
Schedule callback to run in the next animation frame.
Callback to be fired.
Request id.
Queues the callback to be fired during idle periods to perform background and low priority work on the main event loop.
Callback to be fired.
The maximum number of ticks before the callback must be fired.
Removes all timers and tick without firing them and restore now to its original value.
Runs all pending timers until there are none remaining.
Fake milliseconds since the unix epoch.
Runs all pending timers until there are none remaining.
Also breaks the event loop, allowing any scheduled promise callbacks to execute before running the timers.
Fake milliseconds since the unix epoch.
Advanced the clock to the next animation frame while firing all scheduled callbacks.
Fake milliseconds since the unix epoch.
Takes note of the last scheduled timer when it is run, and advances the clock to that time firing callbacks as necessary.
Fake milliseconds since the unix epoch.
Takes note of the last scheduled timer when it is run, and advances the clock to that time firing callbacks as necessary.
Also breaks the event loop, allowing any scheduled promise callbacks to execute before running the timers.
Fake milliseconds since the unix epoch.
Schedules the callback to be fired once 0 milliseconds have ticked by.
Callback to be fired.
Any extra arguments to pass to the callback.
Schedules a callback to be fired every time timeout milliseconds have ticked by.
Callback to be fired.
How many ticks to wait between callbacks.
Any extra arguments to pass to the callback.
Time identifier for cancellation.
Simulates a user changing the system clock.
New system time.
Schedules a callback to be fired once timeout milliseconds have ticked by.
Callback to be fired.
How many ticks to wait to run the callback.
Any extra arguments to pass to the callback.
Time identifier for cancellation.
Advance the clock, firing callbacks if necessary.
How many ticks to advance by.
Fake milliseconds since the unix epoch.
Advance the clock, firing callbacks if necessary.
Also breaks the event loop, allowing any scheduled promise callbacks to execute before running the timers.
How many ticks to advance by.
Fake milliseconds since the unix epoch.
Controls the flow of time.