Arm the timer of the rate limiter with the provided `Duration` (which will fire only once).
(&mut self, dur: Duration, flag: &AtomicBool)
| 295 | impl RateLimiterInner { |
| 296 | // Arm the timer of the rate limiter with the provided `Duration` (which will fire only once). |
| 297 | fn activate_timer(&mut self, dur: Duration, flag: &AtomicBool) { |
| 298 | // Panic when failing to arm the timer (same handling in crate TimerFd::set_state()) |
| 299 | self.timer_fd |
| 300 | .reset(dur, None) |
| 301 | .expect("Can't arm the timer (unexpected 'timerfd_settime' failure)."); |
| 302 | flag.store(true, Ordering::Relaxed); |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | impl RateLimiter { |