Re: wait function

From: Date: Sat, 05 Feb 2005 14:06:01 +0000
Subject: Re: wait function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-208117@lists.php.net to get a copy of this message
Mike wrote:
I would write down an efficient WAIT function. The one I did was as follows: function microdelay($delay) { $UNUSED_PORT=31238; @fsockopen("tcp://localhost",$UNUSED_PORT,$errno,$errstr,$delay); }
Are you looking for something like sleep()? http://us2.php.net/manual/en/function.sleep.php
and for microseconds, depending on your OS + PHP version you may have access to this function: http://us2.php.net/manual/en/function.usleep.php
-M


« previous php.general (#208117) next »