1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! `Clock` — monotonic-clock abstraction shared across the
//! workspace. Living in `entelix-core` so any sub-crate that needs
//! a time source (rate limiters, retry backoff, cost-rate windows,
//! TTL pruning) can take a `&dyn Clock` without depending on
//! `entelix-policy`.
//!
//! Production code wires [`SystemClock`] (delegates to
//! `tokio::time::Instant`); tests pass a deterministic clock so
//! `tokio::time::pause()` + manual `advance` make consumers walk a
//! known schedule.
/// Monotonic-clock abstraction. Implementors must produce strictly
/// non-decreasing values; jitter or skew breaks any consumer that
/// computes elapsed time from the difference of two reads
/// (rate-limit buckets, exponential backoff, TTL windows).
/// `Clock` backed by `tokio::time::Instant`. Honours
/// `tokio::time::pause` so test harnesses can simulate elapsed
/// time without real waits.
;