c-program just a small time measurement tool gcc -Wall libcurl.c -lcurl -o time-test && ./time-test https://php.net ; echo $? Why not used gettimeofday https://blog.habets.se/2010/09/gettimeofday-should-never-be-used-to-measure-time.html