pub trait Timingwhere
Self: Add<Duration, Output = Self> + Sub<Duration, Output = Self> + AddAssign<Duration> + SubAssign<Duration> + Unpin + Clone + PartialEq + Eq + Ord + PartialOrd + Hash + Debug,{
// Required methods
fn now() -> Self;
fn duration_since(&self, other: &Self) -> Duration;
fn as_secs_f64(&self) -> f64;
}
Available on crate feature
time
only.Expand description
An abstraction for to enable Actor known time
Required Methods§
sourcefn duration_since(&self, other: &Self) -> Duration
fn duration_since(&self, other: &Self) -> Duration
Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.
sourcefn as_secs_f64(&self) -> f64
fn as_secs_f64(&self) -> f64
Available on crate features
time-metric
and unstable
only.Returns the number of seconds contained as f64.