c++cmicrotime

Microtime() Equivalent for C and C++?


I am wondering if there is an equivalent to the PHP function microtime() in C and C++. I looked around but couldn't find a definitive answer.

Thanks!


Solution

  • On Linux, you can use gettimeofday, which should give the same information. In fact, I believe that is the function that PHP uses under the covers.