fn waiting_for_cooldown(&mut self) {
		let conf_cooldown = self.config.cooldown;
		let since_last = self.remaining_cooldown_time();

		debug!(
			"configurated cooldown {:2}.{}s",
			conf_cooldown.as_secs(),
			conf_cooldown.subsec_nanos()
		);
		debug!(
			"last request {:2}.{}s ago",
			since_last.as_secs(),
			since_last.subsec_nanos()
		);

		if since_last >= conf_cooldown {
			return;
		}

		let wait = self.config.cooldown - self.remaining_cooldown_time();
		debug!(
			"waiting for cooldown: {:2}.{}s",
			wait.as_secs(),
			wait.subsec_nanos()
		);

		thread::sleep(wait);
	}
// vlocking till we can create a new request
vlocking till we can create a new request
vlocking till we can create a new request
fn waiting_for_cooldown(&mut self) {
		let conf_cooldown = self.config.cooldown;
		let since_last = self.remaining_cooldown_time();
		debug!(
			"configurated cooldown {:2}.{}s",
			conf_cooldown.as_secs(),
			conf_cooldown.subsec_nanos()
		);
		debug!(
			"last request {:2}.{}s ago",
			since_last.as_secs(),
			since_last.subsec_nanos()
		);
		if since_last >= conf_cooldown {
			return;
		}
		let wait = self.config.cooldown - self.remaining_cooldown_time();
		debug!(
			"waiting for cooldown: {:2}.{}s",
			wait.as_secs(),
			wait.subsec_nanos()
		);
		thread::sleep(wait);
	}
fn waiting_for_cooldown ( & mut self ) { let conf_cooldown = self . config . cooldown ; let since_last = self . remaining_cooldown_time ( ) ; debug ! ( " " conf_cooldown as_secs ( ) conf_cooldown subsec_nanos ( ) ) ; debug ! ( " " since_last as_secs ( ) since_last subsec_nanos ( ) ) ; if since_last >= conf_cooldown { return ; } let wait = self . config . cooldown - self . remaining_cooldown_time ( ) ; debug ! ( " " wait as_secs ( ) wait subsec_nanos ( ) ) ; thread :: sleep ( wait ) ; }
vlocking till we can create a new request
vlocking till we can create a new request
&mut self