note 47166 deleted from function.usleep by betz

From: Date: Fri, 05 Nov 2004 01:07:07 +0000
Subject: note 47166 deleted from function.usleep by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-80108@lists.php.net to get a copy of this message
Note Submitter: brainstar at gmail dot com ---- usleep() in windows using PHP 5.0.2 It seems that usleep() in this config has a minimum sleep time of around 10 milliseconds. Thats 10,000 microseconds. ie: <? set_time_limit(10); while(1) { echo "."; usleep(1); ob_flush(); } ?> On windows this only results in about a thousand periods being displayed before the timelimit kills the script. The CPU use is not hit at all. On any other platform this would try to send almost 10 billion periods and probably take a CPU hit in the process ;-) This is worlds better than sleep(), but still doesn't hold a candle to usleep() on other platforms. ---- Reason: useless note

« previous php.notes (#80108) next »