scoutt
Mar 12th, 2002, 12:27 PM
yup just like that.
//this goes at the top of the code:
$mtime = microtime();
$mtime = explode(" ",$mtime);
$APPStartTime = $mtime[1] + $mtime[0];
//and this goes at the bottom (after you've done the processing)
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $APPStartTime);
$APPruntime = round($totaltime,4);
echo "time taken = $APPruntime";
//this goes at the top of the code:
$mtime = microtime();
$mtime = explode(" ",$mtime);
$APPStartTime = $mtime[1] + $mtime[0];
//and this goes at the bottom (after you've done the processing)
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $APPStartTime);
$APPruntime = round($totaltime,4);
echo "time taken = $APPruntime";