clockblocks.scheduler.CompressedTime
- class clockblocks.scheduler.CompressedTime(factor: float = 10.0)[source]
Bases:
TimingBackendA
TimingBackendthat runs scaled real time:now()advancesfactortimes faster and the sleep condition’swait()divides its timeout byfactor. A clock family on this backend runs deterministically fast while cross-thread handshakes still happen as usual.Caveat: handshake / context-switch overhead is not compressed, so a T-second wait costs roughly
T / factor + handshake_overhead. Very large factors hit that floor and loosen achievable timing tolerances (seetests/README.md). 10x is a good default.Methods
A condition whose
wait()shortens any timeout byfactor, so that sleeps in compressed time take correspondingly less real time.now()Real time since this backend was created, scaled up by
factor.