pub struct SystemInstant { /* private fields */ }Implementations§
Source§impl SystemInstant
impl SystemInstant
pub fn now() -> Self
pub fn instant(&self, duration_since_unix_epoch: Duration) -> Instant
pub fn duration_since_unix_epoch(&self) -> Duration
pub fn unix(&self, now: Instant) -> Duration
pub fn ntp(&self, now: Instant) -> u64
pub fn unix2ntp(duration_since_unix_epoch: Duration) -> u64
pub fn ntp2unix(ntp: u64) -> Duration
Trait Implementations§
Source§impl Clone for SystemInstant
impl Clone for SystemInstant
Source§fn clone(&self) -> SystemInstant
fn clone(&self) -> SystemInstant
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SystemInstant
impl Debug for SystemInstant
Source§impl Hash for SystemInstant
impl Hash for SystemInstant
Source§impl Ord for SystemInstant
impl Ord for SystemInstant
Source§fn cmp(&self, other: &SystemInstant) -> Ordering
fn cmp(&self, other: &SystemInstant) -> Ordering
1.21.0 · 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 PartialEq for SystemInstant
impl PartialEq for SystemInstant
Source§impl PartialOrd for SystemInstant
impl PartialOrd for SystemInstant
impl Copy for SystemInstant
impl Eq for SystemInstant
impl StructuralPartialEq for SystemInstant
Auto Trait Implementations§
impl Freeze for SystemInstant
impl RefUnwindSafe for SystemInstant
impl Send for SystemInstant
impl Sync for SystemInstant
impl Unpin for SystemInstant
impl UnwindSafe for SystemInstant
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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