// Idle so long with found function
if (function_exists('time_sleep_until')) {
// Get current time and add idle time
- $sleepUntil = $this->getMilliTime() + $milliSeconds;
+ $sleepUntil = $this->getMilliTime() + abs($milliSeconds) / 1000;
// New PHP 5.1.0 function found
$hasSlept = time_sleep_until($sleepUntil);