pub struct Timer { /* private fields */ }
Implementations§
Source§impl Timer
impl Timer
pub fn new(now: Instant, period: Duration) -> Timer
pub fn period(&mut self) -> Duration
pub fn next_instant(&self) -> Instant
pub fn reset(&mut self, now: Instant)
pub fn set_period(&mut self, period: Duration)
pub fn check_expired(&mut self, now: Instant) -> Option<u32>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Timer
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