Skip to main content

Module time_source

Module time_source 

Source
Expand description

Time source abstraction for testability.

This module provides a TimeSource trait that abstracts time-related operations, allowing production code to use real system time while tests can use a controllable mock implementation for fast, deterministic testing.

See docs/internal/TIMESOURCE_DESIGN.md for the full design document.

Structs§

RealTimeSource
Production implementation using actual system time.
TestTimeSource
Test implementation with controllable time.

Traits§

TimeSource
Abstraction over time-related operations.

Type Aliases§

SharedTimeSource
Type alias for shared time source.