I need some information regarding starting and stopping a timer in PHP. I need to measure the elapsed time from the start of my .exe program (I\'m using exec()
exec()
You can use microtime and calculate the difference:
microtime
$time_pre = microtime(true); exec(...); $time_post = microtime(true); $exec_time = $time_post - $time_pre;
Here's the PHP docs for microtime: http://php.net/manual/en/function.microtime.php