Skip to main content

per_second

Function per_second 

Source
pub fn per_second(requests: u32, window_secs: u32) -> f64
Expand description

Requests per window as a refill rate, in tokens per second.

A fraction, never rounded: see TokenBucket. A window of zero seconds is read as one, which is what the integer version effectively did.