Trait timer_kit::Instant

source ·
pub trait Instantwhere
    Self: Add<Duration, Output = Self> + Sub<Duration, Output = Self> + Sub<Self, Output = Duration> + Sized + Clone + Copy + PartialEq + Eq + PartialOrd + Ord,
{ fn now() -> Self; }
Expand description

A trait that defines an instant.

Implementations

Implementations for the following types are provided with the corresponding features enabled:

TypeFeatureTarget Arch
std::time::Instant"std"non-wasm32
tokio::time::Instant"tokio"non-wasm32
[wasm_timer::Instant]"wasm-timer"wasm32
[fluvio_wasm_timer::Instant]"fluvio-wasm-timer"wasm32

User could also provide their own implementations for other types to use the timer functionalities provided by this crate.

Required Methods§

source

fn now() -> Self

Returns the instant that is “now”

Implementations on Foreign Types§

source§

impl Instant for StdInstant

source§

fn now() -> Self

source§

impl Instant for Instant

source§

fn now() -> Self

Implementors§