pub struct OsTime(/* private fields */);Expand description
A wrapper around OS_time_t representing a specific local time.
This time is based on the underlying OS epoch (e.g., UNIX epoch) and is
distinct from cFE’s mission time (libcfs::time::SysTime).
Implementations§
Source§impl OsTime
impl OsTime
Sourcepub fn from_relative_millis(millis: i32) -> Self
pub fn from_relative_millis(millis: i32) -> Self
Creates an OsTime instance from a relative duration in milliseconds.
This is a safe wrapper for OS_TimeFromRelativeMilliseconds.
Sourcepub fn to_relative_millis(&self) -> i32
pub fn to_relative_millis(&self) -> i32
Calculates the relative duration in milliseconds until this absolute time.
This is a safe wrapper for OS_TimeToRelativeMilliseconds.
Returns OS_CHECK (0) if the time is in the past, or OS_PEND (-1) if
the time is too far in the future to be represented.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OsTime
impl RefUnwindSafe for OsTime
impl Send for OsTime
impl Sync for OsTime
impl Unpin for OsTime
impl UnsafeUnpin for OsTime
impl UnwindSafe for OsTime
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