: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Implements sleep in a way that supports fractional seconds. This is necessary because `usleep` is documented
* as only supporting partial seconds (i.e., anything sub-1 second) while `sleep` only supports whole number
* seconds. For durations above 1 second with a fractional amount, we end up calling both.
* @param int|float $seconds
public static function sleep($seconds) {
$seconds -= (int) $seconds;
usleep((int) (1000000 * $seconds));