Expand description
Logical-clock abstraction shared across the substrate.
Time-based behaviour in atomr (stream throttling, replay gating, rate
limiting) historically reached for tokio::time directly, which couples
correctness to the wall clock. That is fatal for deterministic replay and
point-in-time backtests, where consumers must not observe data “ahead” of a
simulation watermark regardless of async latency.
This module introduces a pluggable Clock so production code runs on
SystemClock while replay / backtest harnesses drive a ManualClock
they advance explicitly. It is the foundation for the clock-gated stream
source (FR-2), the token-bucket rate limiter (FR-3), and record-and-replay
determinism (FR-13).
Structs§
- Logical
Time - Monotonic logical time, measured in nanoseconds since an arbitrary epoch.
- Manual
Clock - An explicitly-advanced logical clock for deterministic replay and backtests.
- System
Clock - Wall-clock
Clockbacked bySystemTime.
Traits§
- Clock
- A source of
LogicalTime.