This php code will calculate how many seconds it to a script to start and then end.
//Create a variable for start time
$time_start = microtime(true);
//Create a variable for end time
$time_end = microtime(true);
//Subtract the two times to get seconds
$time = $time_end - $time_start;
echo 'Script took '.$time.' seconds to exicute';