note 24529 deleted from function.time by nlopess

From: Date: Tue, 06 Jan 2004 15:32:50 +0000
Subject: note 24529 deleted from function.time by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-63005@lists.php.net to get a copy of this message
Note Submitter: kingmundi@hotmail.com ---- [Editor's note: the contributor to the note did not know of the sleep() and usleep() functions that already do the job for you.] If you want to have your program wait for a period of seconds. //arg is the number of seconds to wait function wait($arg) { $then = time() + $arg; //echo "then=" . $then . "<br>\n"; while(1) { $now = time(); //echo "now=" . $now . "<br>\n"; if($now > $then) return; } } wait(3);

« previous php.notes (#63005) next »