Re: time() TIMER in seconds or just numbers
| From: | Richard Heyes | Date: | Mon, 30 Mar 2009 10:38:45 +0000 |
| Subject: | Re: time() TIMER in seconds or just numbers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-290814@lists.php.net to get a copy of this message | ||
2009/3/30 Andrew Williams <andrew4williams@gmail.com>:
> what does time();
>
> $t1 = time();
>
> {
>
> do something
> }
> $t2 = time();
>
> $end_time = $t2 - $t1;
> echo $end_time;
>
> what does $end_time represent?
$end_time is not a great name for it: it's the time (number of
seconds) it took to go from $t1 to $t2. $duration might be better.
> how do you determine the next 5 mins?
Eh? time() + 300 is five minutes from now.
--
Richard Heyes
HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.net (Updated March 14th)