Skip to main content

set_fixed_time_for_tests

Function set_fixed_time_for_tests 

Source
pub fn set_fixed_time_for_tests(rfc3339: &str) -> FixedTimeGuard
Expand description

Pin the clock for the duration of the returned guard. The guard holds a process-wide mutex so concurrent time-pinning tests serialize cleanly — without this, rust’s parallel test runner can have one test’s “drop” race against another test’s “read”.