Development Documentation (main branch) - For stable release docs, see docs.rs/eidetica

Module clock

Module clock 

Source
Expand description

Time provider abstraction

This module provides a Clock trait that abstracts over time sources, allowing production code to use real system time while tests can use controllable mock time.

§Example

use eidetica::{Clock, SystemClock};

let clock = SystemClock;
let millis = clock.now_millis();
let rfc3339 = clock.now_rfc3339();

Structs§

ClockHold
RAII guard that freezes a FixedClock while held.
FixedClock
Test clock with auto-advancing time.
SystemClock
Production clock using real system time.

Traits§

Clock
A time provider for getting current timestamps.