How to find my code execution time?
I am using the below snippet.
I am not happy with that?
list ($msec, $sec) = explode(\' \', microtime());
$mi
If you want the actual processor timings:
$rUsage = getrusage();
echo 'User time = '.sprintf('%.4f',($rUsage['ru_utime.tv_sec'] * 1e6 + $rUsage['ru_utime.tv_usec']) / 1e6).' seconds';
echo 'system time = '.sprintf('%.4f',($rUsage['ru_stime.tv_sec'] * 1e6 + $rUsage['ru_stime.tv_usec']) / 1e6).' seconds';