pub fn with_clocks<R: 'static, F: FnOnce(&Clocks) -> R>(f: F) -> Option<R>Expand description
Obtain the full clocks structure, calling the given closure in a critical section.
The given closure will be called with read-only access to the state of the system clocks. This can be used to query and return the state of a given clock.
As the caller’s closure will be called in a critical section, care must be taken not to block or cause any other undue delays while accessing.
Calls to this function will not succeed until after a successful call to init(),
and will always return None.