pub struct EngineBaseTimer { /* private fields */ }Expand description
Base timer structure with fire delay, interval, and autoclose settings.
This is the core timer struct that Engine uses. It can be armed/disarmed and supports repeating timers via interval.
Implementations§
Source§impl EngineBaseTimer
impl EngineBaseTimer
Sourcepub fn new(fire_delay: f64, interval: f64, autoclose: bool) -> Self
pub fn new(fire_delay: f64, interval: f64, autoclose: bool) -> Self
Create a new EngineBaseTimer
§Arguments
fire_delay- Seconds until timer fires (-1.0 means not armed)interval- Seconds between repeats (-1.0 means no repeat)autoclose- Whether to autoclose the client when timer fires
Sourcepub fn invalidate(&mut self)
pub fn invalidate(&mut self)
Invalidate this timer (disarm it)
Sourcepub fn set_nextfire(&mut self, fire_delay: f64, interval: f64)
pub fn set_nextfire(&mut self, fire_delay: f64, interval: f64)
Set the next fire delay and interval
§Arguments
fire_delay- Seconds until next fire (-1.0 means disarm)interval- Seconds between repeats (-1.0 means no repeat)
Sourcepub fn fire_delay(&self) -> f64
pub fn fire_delay(&self) -> f64
Get the fire delay
Trait Implementations§
Source§impl Clone for EngineBaseTimer
impl Clone for EngineBaseTimer
Auto Trait Implementations§
impl Freeze for EngineBaseTimer
impl RefUnwindSafe for EngineBaseTimer
impl Send for EngineBaseTimer
impl Sync for EngineBaseTimer
impl Unpin for EngineBaseTimer
impl UnsafeUnpin for EngineBaseTimer
impl UnwindSafe for EngineBaseTimer
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