Skip to main content

made_core/ports/
clock.rs

1//! [`ClockPort`] — source of wall-clock time.
2//!
3//! The domain never calls `OffsetDateTime::now_utc` directly so that
4//! deliberations stay reproducible under test and deterministic
5//! clocks can be injected (frozen clocks for replay, accelerated
6//! clocks for load tests, etc.).
7
8use time::OffsetDateTime;
9
10pub trait ClockPort: Send + Sync {
11    fn now(&self) -> OffsetDateTime;
12}