Trait timestamp_source::Timestamp
source · pub trait Timestamp {
type Duration: PartialOrd;
type Error;
fn now() -> Self;
fn duration_since_epoch(self) -> Self::Duration;
fn duration_since(&self, other: &Self) -> Result<Self::Duration, Self::Error>;
}
Expand description
Represents a timestamp.
Required Associated Types§
type Duration: PartialOrd
type Error
Required Methods§
sourcefn duration_since_epoch(self) -> Self::Duration
fn duration_since_epoch(self) -> Self::Duration
Get duration since start.