summaryrefslogtreecommitdiffstats
path: root/examples/the_matrix
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-01-24 18:47:34 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-01-24 18:47:34 +0100
commit3d893ae01b64eb51b2f5854949c694090118e052 (patch)
tree9da2b03d4518fc2b17daf42f544693393c132565 /examples/the_matrix
parent3a07c631add426a308607055d1b46d934f21e7f6 (diff)
downloadiced-3d893ae01b64eb51b2f5854949c694090118e052.tar.gz
iced-3d893ae01b64eb51b2f5854949c694090118e052.tar.bz2
iced-3d893ae01b64eb51b2f5854949c694090118e052.zip
Add `Duration` helpers to `time` module
Diffstat (limited to 'examples/the_matrix')
-rw-r--r--examples/the_matrix/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/the_matrix/src/main.rs b/examples/the_matrix/src/main.rs
index c6b20ece..315e9ee5 100644
--- a/examples/the_matrix/src/main.rs
+++ b/examples/the_matrix/src/main.rs
@@ -1,5 +1,5 @@
use iced::mouse;
-use iced::time::{self, Instant};
+use iced::time::{self, milliseconds, Instant};
use iced::widget::canvas;
use iced::{
Color, Element, Fill, Font, Point, Rectangle, Renderer, Subscription, Theme,
@@ -40,7 +40,7 @@ impl TheMatrix {
}
fn subscription(&self) -> Subscription<Message> {
- time::every(std::time::Duration::from_millis(50)).map(Message::Tick)
+ time::every(milliseconds(50)).map(Message::Tick)
}
}