Expand description
The client-side synchronisation controller.
This is the thing that turns exchanges into clock commands: sample register, discipline loop, and the register bookkeeping that keeps the two consistent when the clock is adjusted underneath them.
It lives here so the daemon and the simulator run the same code. They did not, once: the bookkeeping below was written inside the TIMECORP simulator, and the daemon had no client loop at all. A performance comparison against another implementation is only worth anything if the thing measured is the thing that ships, so the logic was moved here and both call it. The simulator’s recorded S1/S6/S8 numbers are the regression test on that move — they must not change.
Structs§
- Controller
Step - What the controller decided, plus what the caller must do about it.
- Sync
Controller - Drives one source’s samples into clock commands.
Constants§
- REGISTER_
CAPACITY - How many samples one source keeps.