clockblocks.scheduler

Module containing the Scheduler, the single background thread that drives an entire clock family: it holds a queue of upcoming events, sleeps until the next one is due, and wakes the clocks waiting on them. Also contains the TimingBackend that supplies the scheduler’s notion of “now” and how it sleeps, along with CompressedTime, a backend that makes a clock family run in scaled-down real time. (Currently used for testing purposes.)

Classes

CompressedTime([factor])

A TimingBackend that runs scaled real time: now() advances factor times faster and the sleep condition's wait() divides its timeout by factor.

QueueEvent(t, priority, action[, metadata])

Scheduler([timing_policy, precise_timing, ...])

The background timing thread for one clock family.

TimingBackend()

The scheduler's pluggable source of "now" and of the condition it uses for waiting.