Does anyone know an equivalent function of the gettimeofday() function in Windows environment? I am comparing a code execution time in Linux vs Windows. I am us
GetLocalTime() for the time in the system timezone, GetSystemTime() for UTC. If you want a seconds-since-epoch time, use SystemTimeToFileTime() or GetSystemTimeAsFileTime().
For interval taking, use GetTickCount(). It returns milliseconds since startup.
For taking intervals with the best possible resolution (limited by hardware only), use QueryPerformanceCounter().