Skip to content
PACKAGES

ManualClock

Kind: class

Source: src/graphrefly/_clock.py:25

ManualClock()

A clock that moves only by :meth:advance, for tests and the operator trace runner.

Timers due at the same instant fire in the order they were scheduled; a timer scheduled by a firing is due from that firing’s time, so one advance over several periods fires each.

NameTypeDescription
nowfloat
pendingintHow many timers are waiting.
schedule(delay_ms: float, callback: Callable[[], object]) -> Callable[[], None]

Schedule callback at now + delay_ms; return its cancel function.

Source: src/graphrefly/_clock.py:38

advance(ms: float) -> None

Move the clock ms forward, firing each timer as the clock reaches it.

Source: src/graphrefly/_clock.py:54