Re: time() TIMER in seconds or just numbers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux