pub trait Instant<S> where
    S: Sized
{ fn elapsed(&self) -> Duration;
fn now() -> Self;
fn duration_since(&self, earlier: UniversalInstant) -> Duration;
fn checked_add(&self, duration: Duration) -> Option<S>;
fn checked_sub(&self, duration: Duration) -> Option<S>; }
Expand description

Version of std::time::Instant that also works in WebAssembly.

Required methods

Implementors