[][src]Struct abbegm::msg::EgmClock

pub struct EgmClock {
    pub sec: u64,
    pub usec: u64,
}

Fields

sec: u64usec: u64

Implementations

impl EgmClock[src]

pub fn new(sec: u64, usec: u64) -> Self[src]

Create a new time point from seconds and microseconds.

pub fn elapsed_since_epoch(&self) -> Duration[src]

Get the elapsed time since the epoch as Duration.

Note that the duration will have only a microsecond resolution.

pub fn as_timestamp_ms(&self) -> u32[src]

Get the elapsed time as milliseconds since the epoch.

Trait Implementations

impl<'_, '_> Add<&'_ Duration> for &'_ EgmClock[src]

type Output = EgmClock

The resulting type after applying the + operator.

impl<'_, '_> Add<&'_ EgmClock> for &'_ Duration[src]

type Output = EgmClock

The resulting type after applying the + operator.

impl Add<Duration> for EgmClock[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<EgmClock> for Duration[src]

type Output = EgmClock

The resulting type after applying the + operator.

impl<'_> AddAssign<&'_ Duration> for EgmClock[src]

impl AddAssign<Duration> for EgmClock[src]

impl Clone for EgmClock[src]

impl Copy for EgmClock[src]

impl Debug for EgmClock[src]

impl Default for EgmClock[src]

impl Message for EgmClock[src]

impl PartialEq<EgmClock> for EgmClock[src]

impl StructuralPartialEq for EgmClock[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, Right> ClosedAdd<Right> for T where
    T: Add<Right, Output = T> + AddAssign<Right>, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,