pub fn throttle(&self, tokens: u64) -> u64 {
        loop {
            match self.consume(tokens) {
                Ok(rem) => return rem,
                Err(time) => std::thread::sleep(time),
            }
        }
    }
/// Consumes `tokens` blocking if its trying to consume more than available
///
/// Returns how many tokens are available
Consumes `tokens` blocking if its trying to consume more than available
Returns how many tokens are available
Consumes ` tokens ` blocking if its trying to consume more than available Returns how many tokens are available
pub fn throttle(&self, tokens: u64) -> u64 {
        loop {
            match self.consume(tokens) {
                Ok(rem) => return rem,
                Err(time) => std::thread::sleep(time),
            }
        }
    }
pub fn throttle ( & self , tokens : u64 ) -> u64 { loop { match self . consume ( tokens ) { Ok ( rem ) => return rem , Err ( time ) => std :: thread :: sleep ( time ) , } } }
Consumes `tokens` blocking if its trying to consume more than available
Returns how many tokens are available
Consumes ` tokens ` blocking if its trying to consume more than available Returns how many tokens are available
&self
tokens
u64