Skip to main content

reference_get

Function reference_get 

Source
pub fn reference_get<T: Timeline>() -> Unowned<'static, UtcClock<T>>
Expand description

Returns a handle to the currently assigned UTC clock, or a null handle if no such clock currently exists.

Thread safety is the responsibility of the user. In particular, if a clock is fetched by a user using utc::reference_get, but then the clock is swapped out using utc::reference_swap and the original clock is closed, then the initial clock handle returned is now invalid and could result in a use-after-close situation. It is the user’s responsibility to avoid these situations.