Struct twizzler_abi::syscall::ClockInfo
source · #[repr(C)]pub struct ClockInfo { /* private fields */ }
Expand description
Information about a given clock source, including precision and current clock value.
Implementations§
source§impl ClockInfo
impl ClockInfo
pub const ZERO: ClockInfo = _
sourcepub const fn new(
current: TimeSpan,
precision: FemtoSeconds,
resolution: FemtoSeconds,
flags: ClockFlags
) -> Self
pub const fn new( current: TimeSpan, precision: FemtoSeconds, resolution: FemtoSeconds, flags: ClockFlags ) -> Self
Construct a new ClockInfo. You probably want to be getting these from [sys_read_clock_info], though.
sourcepub fn precision(&self) -> FemtoSeconds
pub fn precision(&self) -> FemtoSeconds
Get the precision of a clock source.
sourcepub fn resolution(&self) -> FemtoSeconds
pub fn resolution(&self) -> FemtoSeconds
Get the resolution of a clock source.
sourcepub fn current_value(&self) -> TimeSpan
pub fn current_value(&self) -> TimeSpan
Get the current value of a clock source.
sourcepub fn is_monotonic(&self) -> bool
pub fn is_monotonic(&self) -> bool
Is the clock source monotonic?
Trait Implementations§
Auto Trait Implementations§
impl ObjSafe for ClockInfo
impl RefUnwindSafe for ClockInfo
impl Send for ClockInfo
impl Sync for ClockInfo
impl Unpin for ClockInfo
impl UnwindSafe for ClockInfo
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