pub struct Timestamp {
pub seconds: u32,
pub quarter_nanos: u32,
}Expand description
A representation of a hardware packet timestamp.
This is a reading of the device’s own clock, not of the Instant the stack is polled
with. Such a clock is usually called a “PTP hardware clock” or PHC. It has an arbitrary
epoch (often, but not necessarily, the time since the device was reset) and it drifts
with respect to any other clock in the system unless something is actively disciplining
it. Do not mix Timestamp and Instant values.
Fields§
§seconds: u32Whole seconds.
quarter_nanos: u32Fraction of a second, in units of 0.25 nanoseconds.
Always less than 4_000_000_000, i.e. less than one whole second.
Implementations§
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