Struct naia_shared::Timer
source · pub struct Timer { /* private fields */ }
Expand description
A Timer with a given duration after which it will enter into a “Ringing” state. The Timer can be reset at an given time, or manually set to start “Ringing” again.
Implementations§
source§impl Timer
impl Timer
sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Reset the Timer to stop ringing and wait till ‘Duration’ has elapsed again
sourcepub fn ringing(&self) -> bool
pub fn ringing(&self) -> bool
Gets whether or not the Timer is “Ringing” (i.e. the given Duration has elapsed since the last “reset”)
sourcepub fn ring_manual(&mut self)
pub fn ring_manual(&mut self)
Manually causes the Timer to enter into a “Ringing” state
Auto Trait Implementations§
impl RefUnwindSafe for Timer
impl Send for Timer
impl Sync for Timer
impl Unpin 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