note 62456 added to function.sleep
| From: | arielCo at osu1 dot php dot net | Date: | Wed, 01 Mar 2006 04:38:36 +0000 |
| Subject: | note 62456 added to function.sleep | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-104595@lists.php.net to get a copy of this message | ||
The sleep(3) *nix manpage reads:
DESCRIPTION
sleep() makes the current process sleep until [seconds]
seconds have elapsed or a signal arrives which is not
ignored.
So, ANY incoming signal that has not been set with pcntl_signal() to SIG_IGN causes sleep() to
return.
If you don't want this, maybe
<?php
time_sleep_until(microtime(true) + $secs );
?>
will work, depending on CPU load.
RETURN VALUE
Zero if the requested time has elapsed, or the number of
seconds left to sleep.
The return value is an integer, and (at least in 5.1.2) it is the round()ed remaining time.
----
Server IP: 64.71.164.2
Probable Submitter: 81.52.239.1
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.sleep.php
Edit -- http://master.php.net/note/edit/62456
Del: integrated -- http://master.php.net/note/delete/62456/integrated
Del: useless -- http://master.php.net/note/delete/62456/useless
Del: bad code -- http://master.php.net/note/delete/62456/bad+code
Del: spam -- http://master.php.net/note/delete/62456/spam
Del: non-english -- http://master.php.net/note/delete/62456/non-english
Del: in docs -- http://master.php.net/note/delete/62456/in+docs
Del: other reasons-- http://master.php.net/note/delete/62456
Reject -- http://master.php.net/note/reject/62456
Search -- http://master.php.net/manage/user-notes.php