| Server IP : 68.178.247.200 / Your IP : 216.73.217.108 Web Server : Apache System : Linux p3plzcpnl489463.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 User : x9dppmxs4rgd ( 8559391) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/cwd/wp-content/plugins/wordfence/modules/login-security/classes/utility/ |
Upload File : |
<?php
namespace WordfenceLS;
class Utility_Sleep {
/**
* 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) {
if ($seconds >= 1) {
sleep((int) $seconds);
$seconds -= (int) $seconds;
}
if ($seconds > 0) {
usleep((int) (1000000 * $seconds));
}
}
}