note 76958 deleted from function.gettimeofday by bobby
| From: | bobby@php.net | Date: | Wed, 08 Aug 2007 04:04:43 +0000 |
| Subject: | note 76958 deleted from function.gettimeofday by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-129275@lists.php.net to get a copy of this message | ||
Note Submitter: the dancer
----
Here is my version:
<?php
function wait($usecs){
$temp=gettimeofday();
$start=(int)$temp["usec"];
while(1){
$temp=gettimeofday();
$stop=(int)$temp["usec"];
if ($stop<$start) $stop+=1000000
if ($stop-$start >= $usecs) break;
}
}
?>