In my footer template, I have a link that shows the forum time. You need to find a comon element that's in your footer and nowhere else in you site or this will cause problems.
Code:
<a style="text-decoration:none" title="All times are GMT$timediff. The time now is $timenow" href="javascript:void(0);"><b>Forum Time</b></a>
In the functions.php file, I changed Erwin's $vartext variable to read.
Code:
$vartext = str_replace('<b>Forum Time</b></a>', "<b>Forum Time</b></a> | <a style=\"text-decoration:none\" title=\"$debughtml\" href=\"javascript:void(0);\"><b>Page Stats</b></a><br>",$vartext);
I changed the $debughtml variable to only show total time and query count, it can stay as it was in Erwin's original, but all the text formatting needs to be removed becuase the title tag will show all formatting tags as text.
Code:
$debughtml = "Page generated in $totaltime seconds with $query_count queries";