pub fn update_available(&mut self) {
        let now = self.runtime.now();
        self.bytes_available += self
            .runtime
            .duration_between(self.last_calculation, now)
            .as_secs_f64()
            * self.bandwidth as f64;
        self.bytes_available = self.bytes_available.min(self.burst_bandwidth as f64);
        self.last_calculation = now;
    }
/// Actually update the amount of available bandwidth.  Additional available bytes are not added
/// until this method is called to add them.
Actually update the amount of available bandwidth.  Additional available bytes are not added
until this method is called to add them.
Actually update the amount of available bandwidth . Additional available bytes are not added until this method is called to add them .
pub fn update_available(&mut self) {
        let now = self.runtime.now();
        self.bytes_available += self
            .runtime
            .duration_between(self.last_calculation, now)
            .as_secs_f64()
            * self.bandwidth as f64;
        self.bytes_available = self.bytes_available.min(self.burst_bandwidth as f64);
        self.last_calculation = now;
    }
pub fn update_available ( & mut self ) { let now = self . runtime . now ( ) ; self . bytes_available += self . runtime . duration_between ( self . last_calculation , now ) . as_secs_f64 ( ) * self . bandwidth as f64 ; self . bytes_available = self . bytes_available . min ( self . burst_bandwidth as f64 ) ; self . last_calculation = now ; }
Actually update the amount of available bandwidth.
Actually update the amount of available bandwidth .
&mut self
&mut self