Enable instant only for wasm32 targets
... and hide the dependency under a `time` module in `iced_native`
This commit is contained in:
parent
776724162a
commit
87b3e03d18
6 changed files with 19 additions and 6 deletions
7
native/src/time.rs
Normal file
7
native/src/time.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
//! Keep track of time, both in native and web platforms!
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub use instant::{Duration, Instant};
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub use std::time::{Duration, Instant};
|
||||
Loading…
Add table
Add a link
Reference in a new issue