pub struct Timer { /* private fields */ }Expand description
Timer that generates periodic tick events at 1-second intervals.
The Timer is responsible for generating time-based events that drive the execution of scheduled tasks. It uses a Clock to generate ticks and sends TimerEvent::Tick events through a channel.
Implementations§
Source§impl Timer
impl Timer
Sourcepub fn new(event_sender: Sender<TimerEvent>) -> Self
pub fn new(event_sender: Sender<TimerEvent>) -> Self
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Timer
impl !RefUnwindSafe for Timer
impl Unpin for Timer
impl UnsafeUnpin for Timer
impl !UnwindSafe for Timer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more