From e730d97f61bc2edc77d2f061b6a763c4d0a948df Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 28 Jan 2022 18:43:20 +0700 Subject: Implement `time` module for `wasm-bindgen` backend in `iced_futures` --- core/Cargo.toml | 5 ++--- core/src/time.rs | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/Cargo.toml b/core/Cargo.toml index 83458ac0..dde34326 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -14,6 +14,5 @@ bitflags = "1.2" version = "0.5" optional = true -[target.'cfg(target_arch = "wasm32")'.dependencies.instant] -version = "0.1" -features = ["wasm-bindgen"] +[target.'cfg(target_arch = "wasm32")'.dependencies] +wasm-timer = { version = "0.2" } diff --git a/core/src/time.rs b/core/src/time.rs index 5f95ee86..f496d1a4 100644 --- a/core/src/time.rs +++ b/core/src/time.rs @@ -1,7 +1,9 @@ //! Keep track of time, both in native and web platforms! #[cfg(target_arch = "wasm32")] -pub use instant::{Duration, Instant}; +pub use wasm_timer::Instant; #[cfg(not(target_arch = "wasm32"))] -pub use std::time::{Duration, Instant}; +pub use std::time::Instant; + +pub use std::time::Duration; -- cgit