Hmm.. I'm unsure how you would do this, I think the solution would be javascript. You can find out the execution time of the script itself, but I doubt you can easily determine the amount of time used to transmit it to the browser. Check a page that has this for javascript.
Execution time of script (server-side):
<?php
$startTime = time();
// 5031 lines of code
$scriptTime = time() - $startTime;
print "Script execution took $scriptTime seconds.";
?>