<?php
//No need for microtime at the start of script.
// Use this at the end of your script, or around in the
// code where you need to take meassures.
$time = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"];
echo "Did stuff in $time seconds
";
?>