the PHP manual for the microtime function has a simple way of doing this:
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
/ Do something /
$time_end = getmicrotime();
$time = $time_end - $time_start;
echo "script completed in $time seconds";
-Jim Keller
http://www.centerfuse.net