Struct timestamp_source::Delay
source · pub struct Delay<T: Timestamp, R: RelaxStrategy = Spin> { /* private fields */ }
Expand description
Object that can delay by some duration.
T
- Timestamp
that provides now
.
R
- RelaxStrategy
that provides a strategy to handle an idle.
Implementations§
source§impl<T: Timestamp, R: RelaxStrategy> Delay<T, R>
impl<T: Timestamp, R: RelaxStrategy> Delay<T, R>
sourcepub const fn new(duration: T::Duration) -> Self
pub const fn new(duration: T::Duration) -> Self
Creates a new Delay<T, R>
.
sourcepub fn borrow_duration(&self) -> &T::Duration
pub fn borrow_duration(&self) -> &T::Duration
Borrow the duration of this Delay<T, R>
.
sourcepub fn borrow_mut_duration(&mut self) -> &mut T::Duration
pub fn borrow_mut_duration(&mut self) -> &mut T::Duration
Borrow the mutable duration of this Delay<T, R>
.