instant/lib.rs
1cfg_if::cfg_if! {
2 if #[cfg(any(
3 all(target_arch = "wasm32", not(target_os = "wasi")),
4 target_arch = "asmjs"
5 ))] {
6 #[cfg(all(feature = "stdweb", not(feature = "wasm-bindgen")))]
7 #[macro_use]
8 extern crate stdweb;
9
10 mod wasm;
11 pub use wasm::Instant;
12 #[cfg(feature = "now")]
13 pub use crate::wasm::now;
14 } else {
15 mod native;
16 pub use native::Instant;
17 #[cfg(feature = "now")]
18 pub use native::now;
19 }
20}
21
22pub use std::time::Duration;