set_process_clock

Function set_process_clock 

Source
pub fn set_process_clock(clock: Arc<dyn Clock>) -> bool
Expand description

Install the process clock. Returns false if one has already been read or installed.

Once, at startup, before anything reads it — which is the only discipline a OnceLock can enforce and the reason this returns a bool rather than panicking: a test binary that runs two tests in one process would otherwise abort on the second.