note 93329 added to function.time-sleep-until

From: Date: Thu, 03 Sep 2009 13:11:16 +0000
Subject: note 93329 added to function.time-sleep-until
Groups: php.notes 
Request: Send a blank email to php-notes+get-160190@lists.php.net to get a copy of this message
To ensure that usleep() is called with the same argument as the one being tested - a positive number: <?php if (!function_exists('time_sleep_until')) { function time_sleep_until($future) { $sleep = ($future - microtime(1))*1000000; if ($sleep<=0) { trigger_error("Time in past", E_USER_WARNING); return false; } usleep($sleep); return true; } } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 87.126.189.201 ---- Manual Page -- http://www.php.net/manual/en/function.time-sleep-until.php Edit -- https://master.php.net/note/edit/93329 Del: integrated -- https://master.php.net/note/delete/93329/integrated Del: useless -- https://master.php.net/note/delete/93329/useless Del: bad code -- https://master.php.net/note/delete/93329/bad+code Del: spam -- https://master.php.net/note/delete/93329/spam Del: non-english -- https://master.php.net/note/delete/93329/non-english Del: in docs -- https://master.php.net/note/delete/93329/in+docs Del: other reasons-- https://master.php.net/note/delete/93329 Reject -- https://master.php.net/note/reject/93329 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160190) next »