PHP Time Limit: code example
Example 1: php time a script
//place this before any script you want to calculate time
$time_start = microtime(true);
//sample script
for($i=0; $i<1000; $i++){
//do anything
}
$time_end = microtime(true);
$execution_time = ($time_end - $time_start);
echo 'Total Execution Time: '.($execution_time*1000).'Milliseconds';
Example 2: PHP Time Limit:
set_time_limit(300);
Example 3: set time limit in wp-config
max_execution_time = 300;