[−][src]Trait ratelimit_meter::instant::Relative
A point in time that is used as a reference for measuring a rate limit. On the clock, it has meaning only relative to some other point in time.
When using no_std
, users of this crate are expected to provide
an impl of Relative
that corresponds to their system's time source.
Required methods
fn duration_since(&self, earlier: Self) -> Duration
Returns the amount of time elapsed from an earlier point in time.
Implementations on Foreign Types
impl Relative for Instant
[src]
fn duration_since(&self, earlier: Self) -> Duration
[src]
impl Relative for SystemTime
[src]
fn duration_since(&self, earlier: Self) -> Duration
[src]
Returns the difference in times between the two SystemTimes. Due to the fallible nature of SystemTimes, returns the zero duration if a negative duration would result (e.g. due to system clock adjustments).