1 cfg_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 pub use crate::wasm::now; 13 pub use wasm::SystemTime; 14 } else { 15 mod native; 16 pub use native::Instant; 17 pub use native::now; 18 pub use native::SystemTime; 19 } 20 } 21 22 pub use std::time::Duration; 23