Use instant instead of wasm-timer in iced_core
This commit is contained in:
parent
fc54d6ba31
commit
c6d0046102
11 changed files with 13 additions and 13 deletions
|
|
@ -15,4 +15,4 @@ version = "0.6"
|
|||
optional = true
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
wasm-timer = { version = "0.2" }
|
||||
instant = "0.1"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ system = ["iced_winit/system"]
|
|||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
instant = "0.1"
|
||||
|
||||
[dependencies.glutin]
|
||||
version = "0.29"
|
||||
|
|
|
|||
|
|
@ -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")]
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
///
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
use instant::Instant;
|
||||
use crate::time::Instant;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// A window-related event.
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ application = []
|
|||
window_clipboard = "0.2"
|
||||
log = "0.4"
|
||||
thiserror = "1.0"
|
||||
instant = "0.1"
|
||||
|
||||
[dependencies.winit]
|
||||
version = "0.27"
|
||||
|
|
|
|||
|
|
@ -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")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue