pub struct DelayedTimer { /* private fields */ }Expand description
The delayed-callback timer: one thread draining a deadline-ordered queue
into the callback executor pool. Port of the timerQueue half of
callback.c.
Dropping the timer stops and joins its thread.
Implementations§
Source§impl DelayedTimer
impl DelayedTimer
Sourcepub fn new(sink: CallbackHandle) -> Self
pub fn new(sink: CallbackHandle) -> Self
Create a timer that fires callbacks into sink (the callback executor
pool). Mirrors callbackInit’s single epicsTimerQueueAllocate
(callback.c:300) whose notify routes to callbackRequest.
Sourcepub fn handle(&self) -> TimerHandle
pub fn handle(&self) -> TimerHandle
A cheap, clonable scheduling handle (see TimerHandle).
Sourcepub fn schedule(
&self,
delay: Duration,
priority: CallbackPriority,
cb: Callback,
)
pub fn schedule( &self, delay: Duration, priority: CallbackPriority, cb: Callback, )
Schedule cb after delay — convenience wrapper over
TimerHandle::schedule (pool-dispatched deferred work).
Trait Implementations§
Source§impl Drop for DelayedTimer
impl Drop for DelayedTimer
Auto Trait Implementations§
impl !RefUnwindSafe for DelayedTimer
impl !UnwindSafe for DelayedTimer
impl Freeze for DelayedTimer
impl Send for DelayedTimer
impl Sync for DelayedTimer
impl Unpin for DelayedTimer
impl UnsafeUnpin for DelayedTimer
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