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:
Type | Feature | Target 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.