Implement time module for wasm-bindgen backend in iced_futures

This commit is contained in:
Héctor Ramón Jiménez 2022-01-28 18:43:20 +07:00
parent 167be45a7d
commit e730d97f61
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
7 changed files with 61 additions and 21 deletions

View file

@ -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;