Struct rust_rcs_core::util::timer::Timer
source · pub struct Timer { /* private fields */ }
Implementations§
source§impl Timer
impl Timer
sourcepub fn schedule<F>(&self, delay: Duration, f: F)
pub fn schedule<F>(&self, delay: Duration, f: F)
Schedule a function that will be called once after ‘delay’
execution order of functions scheduled at a a same delay is not guaranteed
Warning
Timer callbacks should be executed as switfly as possible, if you need to block inside the callback, hand it over to another thread
Panics
The schedule
function will panic if delay is no bigger than Duration::ZERO.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Timer
impl Send for Timer
impl Sync for Timer
impl Unpin for Timer
impl !UnwindSafe for Timer
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