You can use the microtime() function to calculate the script timing, like this:
<CODE>
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
for ($i=0; $i < 1000; $i++){
//do nothing, 1000 times
}
$time_end = getmicrotime();
$time = $time_end - $time_start;
echo "Did nothing in $time seconds";
</CODE>
and also, use set_time_limit(0); to make the script as long as it takes to execute.