diff options
| author | 2023-01-12 06:24:44 +0100 | |
|---|---|---|
| committer | 2023-01-12 06:25:59 +0100 | |
| commit | c6d0046102bb6951bf0f1f6102f748199c5889e2 (patch) | |
| tree | fe4b5212f4fc5dc6123c1441087f8b9d505679ce /core | |
| parent | fc54d6ba31246157422d092914ba7c1e483129c4 (diff) | |
| download | iced-c6d0046102bb6951bf0f1f6102f748199c5889e2.tar.gz iced-c6d0046102bb6951bf0f1f6102f748199c5889e2.tar.bz2 iced-c6d0046102bb6951bf0f1f6102f748199c5889e2.zip  | |
Use `instant` instead of `wasm-timer` in `iced_core`
Diffstat (limited to '')
| -rw-r--r-- | core/Cargo.toml | 2 | ||||
| -rw-r--r-- | core/src/time.rs | 6 | 
2 files changed, 6 insertions, 2 deletions
diff --git a/core/Cargo.toml b/core/Cargo.toml index c401f30a..7be4b132 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -15,4 +15,4 @@ version = "0.6"  optional = true  [target.'cfg(target_arch = "wasm32")'.dependencies] -wasm-timer = { version = "0.2" } +instant = "0.1" diff --git a/core/src/time.rs b/core/src/time.rs index f496d1a4..9355ae6d 100644 --- a/core/src/time.rs +++ b/core/src/time.rs @@ -1,9 +1,13 @@  //! Keep track of time, both in native and web platforms!  #[cfg(target_arch = "wasm32")] -pub use wasm_timer::Instant; +pub use instant::Instant; + +#[cfg(target_arch = "wasm32")] +pub use instant::Duration;  #[cfg(not(target_arch = "wasm32"))]  pub use std::time::Instant; +#[cfg(not(target_arch = "wasm32"))]  pub use std::time::Duration;  | 
