Skip to main content

set_clock

Function set_clock 

Source
pub fn set_clock(clock: ClockFn) -> Result<(), ClockFn>
Expand description

Register a custom clock function. Can only be called once per process; subsequent calls are silently ignored (returns Err if already set).

This is intended for mockforge-core::time_travel to register its virtual clock once at startup.