From: marcus at quintic dot co dot uk Operating system: Windows XP PHP version: 4.3.4 PHP Bug Type: Unknown/Other Function Bug description: usleep doesnt work correctly
Description: ------------ (I know the manual says it doesnt work, but it should work because the Sleep function in windows works fine) usleep doesnt work on windows XP (on all windows platforms?). For some reason usleep returns immediately on windows and there doesnt seem to be any way in php of delaying for less than a second without chewing cpu cycles. Having looked at the code behind the usleep function all it does is call the win32 Sleep function which does work, so there must be a bug stopping this from being called. Reproduce code: --------------- <?php usleep(100000); ?> Expected result: ---------------- Should delay for 100000 microseconds. Actual result: -------------- Returns immediately with no delay. -- Edit bug report at http://bugs.php.net/?id=26449&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26449&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26449&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26449&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26449&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26449&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26449&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26449&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26449&r=support Expected behavior: http://bugs.php.net/fix.php?id=26449&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26449&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26449&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26449&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26449&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26449&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26449&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26449&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26449&r=float