Re: Time for page
- From: Sonnich Jensen <sonnich.jensen@xxxxxxxxxxxxxxxxx>
- Date: Fri, 31 Aug 2007 02:55:08 -0700
On Aug 31, 12:07 pm, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@xxxxxxxxxxxxxxxx> wrote:
alexan...@xxxxxxxxxxxxxxx wrote:
On 31 Aug., 09:04, Sonnich Jensen <sonnich.jen...@xxxxxxxxxxxxxxxxx>
wrote:
Hi!
Is there a timer for the page, so I can see how long it has taken for
process the page?
Say, the page opens,and at the buttom there is a text say "it took 4
hrs to process your request" :-)
BR
Sonnich
begin of page
<?PHP
$t1=time();
...end of page...
$t2=time();
$duration=$t2-t1;
echo "it took $duration millisecs";
?>
(Small correction)
Alexander is right, but the samplecode is producing SECONDS, not millis.
time - Return current Unix timestamp
Description
int time ( void )
Returns the current time measured in the number of seconds since the
Unix Epoch (January 1 1970 00:00:00 GMT).
If you want millis, use microtime:
microtime - Return current Unix timestamp with microseconds
Regards,
Erwin Moller- Hide quoted text -
Thanks to both of you. I use the trick as suggested here, I was just
wondering whether there is another solution.
Have a nice weekend
Sonnich
.
- Follow-Ups:
- Re: Time for page
- From: Erwin Moller
- Re: Time for page
- References:
- Time for page
- From: Sonnich Jensen
- Re: Time for page
- From: alexander
- Re: Time for page
- From: Erwin Moller
- Time for page
- Prev by Date: Re: Is this possible?
- Next by Date: Php Tree Menu
- Previous by thread: Re: Time for page
- Next by thread: Re: Time for page
- Index(es):