From 6ef46c971edd862c39d3b30513e549dacc735e04 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Mon, 29 Nov 2010 03:21:50 +0000 Subject: [PATCH] Updated the sleep() manual page to reflect the new Windows behaviour by reintegrating some of the old return values text, adding a specific note based on how SleepEx() is documented to behave on Windows, and adding a Changelog section to document the pre-5.3.4 behaviour. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@305811 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/misc/functions/sleep.xml | 41 ++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/reference/misc/functions/sleep.xml b/reference/misc/functions/sleep.xml index d2fa60abdc..0be8bab044 100644 --- a/reference/misc/functions/sleep.xml +++ b/reference/misc/functions/sleep.xml @@ -37,16 +37,15 @@ &reftitle.returnvalues; - On all platforms, sleep returns &false; if the - seconds parameter is invalid. + Returns zero on success, or &false; on error. - On Windows, provided the aforementioned seconds - parameter is valid, sleep always returns &null;. - - - On other platforms, sleep returns zero on success, or - the number of seconds left to sleep if interrupted by a signal. + If the call was interrupted by a signal, sleep returns + a non-zero value. On Windows, this value will always be + 192 (the value of the + WAIT_IO_COMPLETION constant within the Windows API). + On other platforms, the return value will be the number of seconds left to + sleep. @@ -58,6 +57,32 @@ + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 5.3.4 + + Before PHP 5.3.4, on Windows, sleep always + returns &null; when sleep has occurred, regardless of whether the + sleep was interrupted or not. + + + + + + + + &reftitle.examples;