Lines Matching refs:Instant
1 # Instant chapter
3 If you call `std::time::Instant::now()` on a WASM platform, it will panic. This crate provides a pa…
4 replacement for `std::time::Instant` that works on WASM too. This defines the type `instant::Instan…
6 * A struct emulating the behavior of **std::time::Instant** if you are targeting `wasm32-unknown-un…
8 * A type alias for `std::time::Instant` otherwise.
12 …** or **wasm-bindgen** feature is enabled, this crate will continue to rely on `std::time::Instant`
34 // Will be the same as `std::time::Instant`.
35 let now = instant::Instant::new();
53 // Will emulate `std::time::Instant` based on `performance.now()`.
54 let now = instant::Instant::new();
72 // Will emulate `std::time::Instant` based on `Date.now()`.
73 let now = instant::Instant::new();
96 let now = instant::Instant::new();
118 let now_instant = instant::Instant::new();
134 let now_instant = instant::Instant::new();