I have script.sh
that sends a request to some URL and prints the execution time using whet
. Here is the source code:
time wget http://some.url
When I run it from command line, I see time result with an accuracy of 3 decimal places:
real 0m0.584s
user 0m0.000s
sys 0m0.002s
But, when I run this SH using PHP function exec("script.sh", $output)
- , I see time result with an accuracy of only 2 decimal places:
0.00user 0.00system 0:00.32elapsed 0%CPU (0avgtext+0avgdata 3788maxresident)k
How can I get the same result, as I do see in command line?