Re: cvs: php-src / NEWS /ext/standard basic_functions.c basic_functions.h
| From: | Ilia Alshanetsky | Date: | Wed, 12 Nov 2003 23:50:21 +0000 |
| Subject: | Re: cvs: php-src / NEWS /ext/standard basic_functions.c basic_functions.h | ||
| References: | 1 2 3 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-24517@lists.php.net to get a copy of this message | ||
On November 12, 2003 06:34 pm, Moriyoshi Koizumi wrote:Moriyoshi
> I think it'd rather belong to a matter of stupidity that the user has to
> choose the available function in order to accomplish a common purpose.
> Actually they don't act like one another though.
Well, the 3 sleep functions we now have are actually quite different.
sleep() offers a basic second based functionality. As far as glibc goes
sleep() on many platforms is implemented using nanosleep().
usleep() allows sleeping at 1/1,000,000 intervals
nanosleep() allows an easy way to sleep for given amount of seconds and sleep
precision of up to 1/1,000,000,000 of a second. In addition allowing you to
resume sleep if it was interrupted by a signal.
To me it seems like each of the 3 functions offer distinct functionality and
the user now has greater flexibility, when it comes to pausing their scripts.
Ilia