I need some information regarding starting and stopping a timer in PHP. I need to measure the elapsed time from the start my .exe program (Im using exec() function in my php script) until it completes the execution and and display the time it took in seconds. Is there a way how I can do this.
Thanks
For your purpose, this simple class should be all you need:
Use the
microtime
function. The documentation includes example code.You can use Timer Class
You can use
microtime
and calculate the difference:Here's the PHP docs for
microtime
: http://php.net/manual/en/function.microtime.php