> I have a php script that returns about 1.5Mb of data in text format to the
> user. I am wondering if there is a way for php to display the time it took
> to execute the script at the end of the file.

Put this at the top of the script:

function getmicrotime(){ 
    list($usec, $sec) = explode(" ",microtime()); 
    return ((float)$usec + (float)$sec); 

$time_start = getmicrotime();

..and this at the end:

$time_end = getmicrotime();
$time = $time_end - $time_start;
$foo = round ($time, 2);
echo "Execution took $foo seconds.";

Hope this helps.

Best regards,


PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to