Expand description
Time utilities with support for both standard system time and simulated time.
This crate provides a unified interface for getting the current time, with the ability to
switch between real system time and simulated time for testing purposes. When the simulator
feature is enabled, time can be controlled programmatically for deterministic testing.
§Features
std- Enables standard library time functionssimulator- Enables time simulation capabilities for testingchrono- Adds support forchronoDateTimetypes
§Examples
use switchy_time::now;
use std::time::SystemTime;
let current_time = now();Re-exports§
pub use simulator::instant_now;pub use simulator::now;