summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Cargo.toml2
-rw-r--r--core/src/time.rs6
-rw-r--r--glutin/Cargo.toml1
-rw-r--r--glutin/src/application.rs2
-rw-r--r--native/Cargo.toml1
-rw-r--r--native/src/widget/text_input.rs3
-rw-r--r--native/src/window.rs3
-rw-r--r--native/src/window/event.rs3
-rw-r--r--native/src/window/redraw_request.rs2
-rw-r--r--winit/Cargo.toml1
-rw-r--r--winit/src/application.rs2
11 files changed, 13 insertions, 13 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;
diff --git a/glutin/Cargo.toml b/glutin/Cargo.toml
index a458ee9e..709b118b 100644
--- a/glutin/Cargo.toml
+++ b/glutin/Cargo.toml
@@ -17,7 +17,6 @@ system = ["iced_winit/system"]
[dependencies]
log = "0.4"
-instant = "0.1"
[dependencies.glutin]
version = "0.29"
diff --git a/glutin/src/application.rs b/glutin/src/application.rs
index a2096ee4..da0af5c0 100644
--- a/glutin/src/application.rs
+++ b/glutin/src/application.rs
@@ -11,11 +11,11 @@ use iced_winit::conversion;
use iced_winit::futures;
use iced_winit::futures::channel::mpsc;
use iced_winit::renderer;
+use iced_winit::time::Instant;
use iced_winit::user_interface;
use iced_winit::{Clipboard, Command, Debug, Event, Proxy, Settings};
use glutin::window::Window;
-use instant::Instant;
use std::mem::ManuallyDrop;
#[cfg(feature = "tracing")]
diff --git a/native/Cargo.toml b/native/Cargo.toml
index 040ea454..bbf92951 100644
--- a/native/Cargo.toml
+++ b/native/Cargo.toml
@@ -14,7 +14,6 @@ debug = []
twox-hash = { version = "1.5", default-features = false }
unicode-segmentation = "1.6"
num-traits = "0.2"
-instant = "0.1"
[dependencies.iced_core]
version = "0.6"
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs
index e5b7d93a..8755b85d 100644
--- a/native/src/widget/text_input.rs
+++ b/native/src/widget/text_input.rs
@@ -18,6 +18,7 @@ use crate::layout;
use crate::mouse::{self, click};
use crate::renderer;
use crate::text::{self, Text};
+use crate::time::{Duration, Instant};
use crate::touch;
use crate::widget;
use crate::widget::operation::{self, Operation};
@@ -28,8 +29,6 @@ use crate::{
Rectangle, Shell, Size, Vector, Widget,
};
-use instant::{Duration, Instant};
-
pub use iced_style::text_input::{Appearance, StyleSheet};
/// A field that can be filled with text.
diff --git a/native/src/window.rs b/native/src/window.rs
index 94201059..bd92730d 100644
--- a/native/src/window.rs
+++ b/native/src/window.rs
@@ -12,8 +12,7 @@ pub use redraw_request::RedrawRequest;
pub use user_attention::UserAttention;
use crate::subscription::{self, Subscription};
-
-use instant::Instant;
+use crate::time::Instant;
/// Subscribes to the frames of the window of the running application.
///
diff --git a/native/src/window/event.rs b/native/src/window/event.rs
index 64dd17d7..e2fb5e66 100644
--- a/native/src/window/event.rs
+++ b/native/src/window/event.rs
@@ -1,4 +1,5 @@
-use instant::Instant;
+use crate::time::Instant;
+
use std::path::PathBuf;
/// A window-related event.
diff --git a/native/src/window/redraw_request.rs b/native/src/window/redraw_request.rs
index be5bd757..3b4f0fd3 100644
--- a/native/src/window/redraw_request.rs
+++ b/native/src/window/redraw_request.rs
@@ -1,4 +1,4 @@
-use instant::Instant;
+use crate::time::Instant;
/// A request to redraw a window.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
diff --git a/winit/Cargo.toml b/winit/Cargo.toml
index 872b30c8..94aaa2ca 100644
--- a/winit/Cargo.toml
+++ b/winit/Cargo.toml
@@ -21,7 +21,6 @@ application = []
window_clipboard = "0.2"
log = "0.4"
thiserror = "1.0"
-instant = "0.1"
[dependencies.winit]
version = "0.27"
diff --git a/winit/src/application.rs b/winit/src/application.rs
index 4d7382cc..88179391 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -20,11 +20,11 @@ use iced_futures::futures::channel::mpsc;
use iced_graphics::compositor;
use iced_graphics::window;
use iced_native::program::Program;
+use iced_native::time::Instant;
use iced_native::user_interface::{self, UserInterface};
pub use iced_native::application::{Appearance, StyleSheet};
-use instant::Instant;
use std::mem::ManuallyDrop;
#[cfg(feature = "trace")]