struct Instant { ... }
A reading of CLOCK_MONOTONIC: it never goes back, and its start is arbitrary, so only the difference between two readings means anything.
Methods
method nowsource
fn now() -> Instant { ... }
The current reading of the monotonic clock, from the C runtime, which names the host's CLOCK_MONOTONIC.
method sincesource
fn since(self, earlier: Instant) -> Duration { ... }
The time from earlier to this reading; zero if earlier is later.
method elapsedsource
fn elapsed(self) -> Duration { ... }
The time from this reading to now: Instant::now().since(self).
method addsource
fn add(self, duration: Duration) -> Instant { ... }
The reading duration after this one.
Instances
instance Eq[Instant, Instant]source
instance Eq[Instant, Instant] { ... }
In std::time.
Readings are equal when they are of the same moment.
instance Ord[Instant, Instant]source
instance Ord[Instant, Instant] { ... }
In std::time.
The earlier reading orders first.