I have added the following go to the top of my header template file:
<?
$gen_time = microtime();
$gen_time = explode(' ', $gen_time);
$gen_time = $gen_time[1] + $gen_time[0];
$gen_start = $gen_time;
?>
I have added the following code to the bottom of the footer template:
<?
$gen_time = microtime();
$gen_time = explode(' ', $gen_time);
$gen_time = $gen_time[1] + $gen_time[0];
$gen_finish = $gen_time;
$total_gen_time = round(($gen_finish - $gen_start), 4);
echo 'Page generated in '.$total_gen_time.' seconds.'."<br />";
?>
For the life of me, I cannot figure out why I get outputs like this when the page loads near instant:
Page generated in 1207596110.82 seconds.
I have used this code outside WP without problems. Why is it an issue with WP templates? Any thoughts?