Skip to main content

Module manual_time_provider

Module manual_time_provider 

Source
Expand description

§Virtual clock for deterministic tests

Implements crate::tools::time_provider::time_provider::TimeProvider as a manually-advanced clock. Tests set the “current” time explicitly, and every sleep returns immediately — so a simulated network that covers hours or days of activity runs in a few hundred milliseconds of wall time, deterministically.

Structs§

ManualTimeProvider
Implementation of TimeProvider that allows manual control of time
ManualTimeProviderSleep
Future returned by ManualTimeProvider::sleep