Lines Matching refs:instant
4 replacement for `std::time::Instant` that works on WASM too. This defines the type `instant::Instan…
16 By enabling the feature `now` the function `instant::now()` will be exported and will either:
24 ### Using `instant` for a native platform.
28 instant = "0.1"
35 let now = instant::Instant::new();
41 ### Using `instant` for a WASM platform.
47 instant = { version = "0.1", features = [ "stdweb" ] }
54 let now = instant::Instant::new();
60 ### Using `instant` for a WASM platform where `performance.now()` is not available.
66 instant = { version = "0.1", features = [ "wasm-bindgen", "inaccurate" ] }
73 let now = instant::Instant::new();
80 ### Using `instant` for any platform enabling a feature transitively.
84 stdweb = [ "instant/stdweb" ]
85 wasm-bindgen = [ "instant/wasm-bindgen" ]
88 instant = "0.1"
96 let now = instant::Instant::new();
106 stdweb = [ "instant/stdweb" ]
107 wasm-bindgen = [ "instant/wasm-bindgen" ]
110 instant = { version = "0.1", features = [ "now" ] }
118 let now_instant = instant::Instant::new();
119 let now_milliseconds = instant::now(); // In milliseconds.
127 instant = { version = "0.", features = [ "now" ] }
134 let now_instant = instant::Instant::new();
135 let now_milliseconds = instant::now(); // In milliseconds.