Add Duration helpers to time module
This commit is contained in:
parent
3a07c631ad
commit
3d893ae01b
8 changed files with 40 additions and 19 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue