Struct wlan_common::timer::Timer
source · pub struct Timer<E> { /* private fields */ }
Implementations§
source§impl<E> Timer<E>
impl<E> Timer<E>
pub fn new(sender: EventSender<E>) -> Self
sourcepub fn now(&self) -> Time
pub fn now(&self) -> Time
Returns the current time according to the global executor.
§Panics
This function will panic if it’s called when no executor is set up.
pub fn schedule_at(&mut self, deadline: Time, event: E) -> EventId
pub fn schedule_after(&mut self, duration: Duration, event: E) -> EventId
pub fn schedule<EV>(&mut self, event: EV) -> EventIdwhere
EV: TimeoutDuration + Into<E>,
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for Timer<E>
impl<E> !RefUnwindSafe for Timer<E>
impl<E> Send for Timer<E>where
E: Send,
impl<E> Sync for Timer<E>where
E: Send,
impl<E> Unpin for Timer<E>
impl<E> !UnwindSafe for Timer<E>
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