Re: time() TIMER in seconds or just numbers
| From: | Stuart | Date: | Mon, 30 Mar 2009 10:36:55 +0000 |
| Subject: | Re: time() TIMER in seconds or just numbers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-290813@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?
The number of seconds it took to "do something".
> how do you determine the next 5 mins?
Assuming you mean "what will time() return in 5 minutes time?"...
$five_minutes_time = time() + 300; // 300 seconds in 5 minutes
If you mean something else please try rephrasing the question.
-Stuart
--
http://stut.net/