Im looking to add a script to the footer page of my website to display something like the following:

Page Generation Time: 0.15734 | 9 Queries Executed

Did I need to add a counter for the queries and just add 1 to it each query I make or is there a process that automates it?

The generation time I need a little help with too, ive seen topics with mktime() or something like that, do I just retrieve the time() before queries are executed and the time() after the queries are done and subtract them?