diff options
author | 2025-01-24 18:47:34 +0100 | |
---|---|---|
committer | 2025-01-24 18:47:34 +0100 | |
commit | 3d893ae01b64eb51b2f5854949c694090118e052 (patch) | |
tree | 9da2b03d4518fc2b17daf42f544693393c132565 /examples/clock | |
parent | 3a07c631add426a308607055d1b46d934f21e7f6 (diff) | |
download | iced-3d893ae01b64eb51b2f5854949c694090118e052.tar.gz iced-3d893ae01b64eb51b2f5854949c694090118e052.tar.bz2 iced-3d893ae01b64eb51b2f5854949c694090118e052.zip |
Add `Duration` helpers to `time` module
Diffstat (limited to 'examples/clock')
-rw-r--r-- | examples/clock/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs index 7d11a3b5..0810594f 100644 --- a/examples/clock/src/main.rs +++ b/examples/clock/src/main.rs @@ -1,5 +1,5 @@ use iced::mouse; -use iced::time; +use iced::time::{self, milliseconds}; use iced::widget::canvas::{stroke, Cache, Geometry, LineCap, Path, Stroke}; use iced::widget::{canvas, container}; use iced::{alignment, Radians}; @@ -49,7 +49,7 @@ impl Clock { } fn subscription(&self) -> Subscription<Message> { - time::every(time::Duration::from_millis(500)) + time::every(milliseconds(500)) .map(|_| Message::Tick(chrono::offset::Local::now())) } |