PDA

View Full Version : Script Execution time


sir pannels
05-15-2003, 11:23 AM
hey :)
anyone know how i found this?
is there a variable for it?

Weirdan
05-15-2003, 12:07 PM
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";

sir pannels
05-18-2003, 02:50 PM
thanks alot man :)
ill try it out