Implement time module for wasm-bindgen backend in iced_futures
This commit is contained in:
parent
167be45a7d
commit
e730d97f61
7 changed files with 61 additions and 21 deletions
|
|
@ -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" }
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue