note 71796 deleted from function.time-sleep-until by cmb

From: Date: Sun, 16 Jun 2019 12:43:15 +0000
Subject: note 71796 deleted from function.time-sleep-until by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211297@lists.php.net to get a copy of this message
Note Submitter: roberto at spadim dot com dot br ---- better implementation <?php if (!function_exists('time_sleep_until')) { function time_sleep_until($future) { if ($future < time()) { trigger_error("Time in past", E_USER_WARNING); return false; } usleep(($future - microtime(1))*1000000); return true; } } ?>

« previous php.notes (#211297) next »