how to use gettimeofday() or something equivalent with Visual Studio C++ 2008?

In UNIX the use of the timezone struct is obsolete. I don’t know why you use it. See http://linux.about.com/od/commands/l/blcmdl2_gettime.htm But if you want to use this structure to know about GMT(UTC) diffrence from your local time it will be next: tz_minuteswest is the real diffrence in minutes from GMT(UTC) and a tz_dsttime is a flag … Read more

faster equivalent of gettimeofday

POSIX Clocks I wrote a benchmark for POSIX clock sources: time (s) => 3 cycles ftime (ms) => 54 cycles gettimeofday (us) => 42 cycles clock_gettime (ns) => 9 cycles (CLOCK_MONOTONIC_COARSE) clock_gettime (ns) => 9 cycles (CLOCK_REALTIME_COARSE) clock_gettime (ns) => 42 cycles (CLOCK_MONOTONIC) clock_gettime (ns) => 42 cycles (CLOCK_REALTIME) clock_gettime (ns) => 173 cycles (CLOCK_MONOTONIC_RAW) … Read more