diff --git a/composer.json b/composer.json index efbe136..91e9747 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "macroman/rate-limiter", "description": "General framework agnostic rate limiter", - "version": "1.0.2", + "version": "1.0.3", "type": "library", "homepage": "https://github.com/MacroMan/rate-limiter", "license": "GPL-3.0-or-later", diff --git a/src/RateLimiter/Limiter.php b/src/RateLimiter/Limiter.php index 6cd1b71..421981d 100644 --- a/src/RateLimiter/Limiter.php +++ b/src/RateLimiter/Limiter.php @@ -52,7 +52,7 @@ public function await(): void if (!$this->is_free()) { $wait_duration = $this->duration_until_free(); - usleep($wait_duration); + usleep(ceil($wait_duration)); } }