pub struct TimeoutCounter {
pub tick_rate: Duration,
pub total_count: u64,
pub current_count: AtomicU64,
pub start_time: RwLock<Instant>,
}Fields§
§tick_rate: Duration§total_count: u64§current_count: AtomicU64§start_time: RwLock<Instant>Implementations§
Source§impl TimeoutCounter
impl TimeoutCounter
Sourcepub fn new(interval: CountOrDuration, timeout: CountOrDuration) -> Self
pub fn new(interval: CountOrDuration, timeout: CountOrDuration) -> Self
TODO this can actually be a fixed timeout with default of 1 increments (assuming the future gets cancelled) Then the second part would always be duration and the tick increment would be num or duration
pub fn next_timeout(&self) -> NextTimeout ⓘ
pub fn reset(&self)
Auto Trait Implementations§
impl !Freeze for TimeoutCounter
impl RefUnwindSafe for TimeoutCounter
impl Send for TimeoutCounter
impl Sync for TimeoutCounter
impl Unpin for TimeoutCounter
impl UnwindSafe for TimeoutCounter
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