pub struct Now {
pub monotonic_ms: u64,
pub unix_ms: u64,
}Expand description
A moment in time, as the host’s two clocks see it.
Monotonic time drives every deadline, because it only ever moves forward; wall clock can jump
when a user resets their system clock or NTP steps it. Wall clock exists only to stamp a message
the server did not stamp itself with server-time, so this module never reads unix_ms at all.
Fields§
§monotonic_ms: u64Milliseconds on a clock that never goes backward.
unix_ms: u64Milliseconds since the Unix epoch.
Trait Implementations§
impl Copy for Now
Source§impl<'de> Deserialize<'de> for Now
impl<'de> Deserialize<'de> for Now
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Now
impl StructuralPartialEq for Now
Auto Trait Implementations§
impl Freeze for Now
impl RefUnwindSafe for Now
impl Send for Now
impl Sync for Now
impl Unpin for Now
impl UnsafeUnpin for Now
impl UnwindSafe for Now
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