pub struct Timestamp { /* private fields */ }Expand description
A reading of a PTP hardware clock.
The clock has an arbitrary epoch and drifts with respect to other clocks unless it is actively disciplined. Do not mix this with executor time.
Implementations§
Source§impl Timestamp
impl Timestamp
Sourcepub const fn from_seconds_and_nanos(seconds: u32, nanos: u32) -> Self
pub const fn from_seconds_and_nanos(seconds: u32, nanos: u32) -> Self
Construct a timestamp from seconds and nanoseconds.
Sourcepub const fn from_seconds_and_quarter_nanos(
seconds: u32,
quarter_nanos: u32,
) -> Self
pub const fn from_seconds_and_quarter_nanos( seconds: u32, quarter_nanos: u32, ) -> Self
Construct a timestamp from seconds and quarter nanoseconds.
Sourcepub const fn quarter_nanos(&self) -> u32
pub const fn quarter_nanos(&self) -> u32
Get the fractional quarter nanoseconds within the current second.
Trait Implementations§
impl Copy for Timestamp
impl Eq for Timestamp
Source§impl Ord for Timestamp
impl Ord for Timestamp
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Timestamp
impl PartialOrd for Timestamp
impl StructuralPartialEq for Timestamp
Auto Trait Implementations§
impl Freeze for Timestamp
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnsafeUnpin for Timestamp
impl UnwindSafe for Timestamp
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