Showing users the page rendertime
Posted: Sun Feb 05, 2006 5:39 pm
Hi,
I hope this forum is the right place for this little tip.
OK, let's start.
1. Open your template index.php
2. Put the following code next to
3. Now put the following code near to the bottom of your site (e.g. right before
That's all, easy I think.
Comments welcome.
I hope this forum is the right place for this little tip.

OK, let's start.
1. Open your template index.php
2. Put the following code next to
Code: Select all
<?php function getmicrotime() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec); }
$starttime = getmicrotime(); ?>
3. Now put the following code near to the bottom of your site (e.g. right before
Code: Select all
<?php $endtime = getmicrotime();
echo"This site was generated in<br />", number_format($endtime-$starttime, 4, ",", "."), " seconds."; ?>
That's all, easy I think.

Comments welcome.