pub struct StaticTimeManager { /* private fields */ }
Expand description
Manager for time.
Implementations§
Source§impl StaticTimeManager
impl StaticTimeManager
Sourcepub fn set_uptime_fn(&mut self, cb: fn() -> Duration)
pub fn set_uptime_fn(&mut self, cb: fn() -> Duration)
Set the function that returns the uptime
Sourcepub fn get_uptime(&self) -> Option<Duration>
pub fn get_uptime(&self) -> Option<Duration>
Function that return the uptime.
Sourcepub fn get_uptime_or(&self, default_uptime: u64) -> Duration
pub fn get_uptime_or(&self, default_uptime: u64) -> Duration
Function that return the uptime. The value default_uptime
(in nanoseconds) is used if not uptime callback function is defined.
Trait Implementations§
Source§impl Default for StaticTimeManager
impl Default for StaticTimeManager
Source§fn default() -> StaticTimeManager
fn default() -> StaticTimeManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StaticTimeManager
impl RefUnwindSafe for StaticTimeManager
impl Send for StaticTimeManager
impl Sync for StaticTimeManager
impl Unpin for StaticTimeManager
impl UnwindSafe for StaticTimeManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more