Simple php function that find and return page load time.
function loadTime(){
$start = time();
// put a long operation in here
sleep(2);
$diff = time() - $start;
return $diff
}
// if you want a more exact value, you could use the
// microtime function