Jump to content

Recommended Posts

Posted

does anyone know how to put in that code that tells how much time it took to make the page? i searched on google and lets say that a script about time isn't what i want.

thanks


Posted

use the microtime() function its real eazy

example :-

function getmicrotime(){

list($msec, $sec) = explode(" ",microtime());

return ((float)$msec + (float)$sec);

}

$time_start = getmicrotime();

// Code goes here...

$time_end = getmicrotime();

$time = sprintf('%.16f', $time_end - $time_start);

echo 'parsed in ' . $time . ' seconds';

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...