Struct windows_win::raw::timer::QueueTimer
source · pub struct QueueTimer { /* private fields */ }
Expand description
Timer that schedules callback on thread pool
By default Drop
implementation deletes queue without waiting for
callback to be finished.
If you want to wait then you can use delete
method.
Implementations§
source§impl QueueTimer
impl QueueTimer
sourcepub unsafe fn cancel<T: CompleteEvent>(&self, _event: T) -> Result<()>
pub unsafe fn cancel<T: CompleteEvent>(&self, _event: T) -> Result<()>
Cancels timer without consuming it
User must ensure that drop is not called by forgetting timer
sourcepub fn reset(&self, due_time: c_ulong, period: c_ulong) -> Result<()>
pub fn reset(&self, due_time: c_ulong, period: c_ulong) -> Result<()>
Resets timer with new values of due_time and period
Note: if you call it on a one-shot timer (its period is zero) that has already expired, the timer is not updated.
sourcepub fn delete<T: CompleteEvent>(self, event: T) -> Result<()>
pub fn delete<T: CompleteEvent>(self, event: T) -> Result<()>
Deletes timer and consumes it.
Trait Implementations§
Auto Trait Implementations§
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