True when nothing is scheduled: no deferred work and no pending timers.
Virtual time of the next timer, if any.
Number of pending tasks (deferred work + timers).
Deferred work waiting to run now (e.g. queued external events).
Advance by ms, running everything due.
Cancel a timer from setTimeout. Unknown or already-fired handles are ignored.
Run fn soon, after the current task (a microtask on the real clock).
The current time in ms (real or virtual).
Runs deferred work, then fires timers in time order, advancing virtual
time, until nothing is pending or the next timer is later than until
(absolute virtual ms). Returns the number of tasks run.
Run exactly one task: the oldest deferred one, else the earliest timer (advancing virtual time to it). Returns false when nothing is pending.
Run fn after ms milliseconds of this clock's time; returns a handle for clearTimeout.
Deterministic time for tests and playback. Timers live in a binary heap (O(log n) to schedule and fire) and cancelling is O(1), so a clock with hundreds of thousands of pending timers stays fast.