Re: time() TIMER in seconds or just numbers
| From: | Shawn McKenzie | Date: | Mon, 30 Mar 2009 20:35:24 +0000 |
| Subject: | Re: time() TIMER in seconds or just numbers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-290864@lists.php.net to get a copy of this message | ||
Andrew Williams wrote:
> what does time();
>
> $t1 = time();
>
> {
>
> do something
> }
> $t2 = time();
>
> $end_time = $t2 - $t1;
> echo $end_time;
>
> what does $end_time represent?
>
> how do you determine the next 5 mins?
So if you haven't deduced the answer from other replies, this would
probably be more readable:
$start_time = time(); //or microtime()
//do something
$end_time = time(); //or microtime()
$duration = $end_time - $start_time;
echo $duration;
--
Thanks!
-Shawn
http://www.spidean.com