Skip to content

Commit ab7adb8

Browse files
switch to stricter conversion for microseconds
1 parent 17d0cce commit ab7adb8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/CustomSleepMixin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ protected static function customSleep(float|int $delay): void
1616
}
1717

1818
$seconds = intval($delay);
19-
$micros = $delay - $seconds;
19+
$micros = (int) round(((float) $delay - $seconds) * 1_000_000);
2020
if ($seconds > 0) {
2121
sleep($seconds);
2222
}

0 commit comments

Comments
 (0)