pub fn purge_old(&mut self, now: SystemTime) {
        while let Some(oldest) = self.time_windows.front() {
            if self.window_to_time(oldest.window + 1) + self.max_age <= now {
                self.total_count -= oldest.count;
                self.time_windows.pop_front();
            } else {
                break;
            }
        }
    }
/// Forget about all cycles minting events older than `now -
/// self.max_age`.
Forget about all cycles minting events older than `now
self.max_age`.
Forget about all cycles minting events older than ` now self . max_age ` .
pub fn purge_old(&mut self, now: SystemTime) {
        while let Some(oldest) = self.time_windows.front() {
            if self.window_to_time(oldest.window + 1) + self.max_age <= now {
                self.total_count -= oldest.count;
                self.time_windows.pop_front();
            } else {
                break;
            }
        }
    }
pub fn purge_old ( & mut self , now : SystemTime ) { while let Some ( oldest ) = self . time_windows . front ( ) { if self . window_to_time ( oldest . window + 1 ) + self . max_age <= now { self . total_count -= oldest . count ; self . time_windows . pop_front ( ) ; } else { break ; } } }
Forget about all cycles minting events older than `now
self.max_age`.
Forget about all cycles minting events older than ` now self . max_age ` .
&mut self
now
SystemTime
&mut self
now
SystemTime