BTW: I like the mingw implementation, much simpler. It uses the GetSystemTimeAsFileTime() API not performance counters.
On Wed, Feb 22, 2012 at 8:46 PM, Alon Bar-Lev <alon.bar...@gmail.com> wrote: > For all who cannot build and have access to Windows machine. > Please run binary[1] and send output. > > [1] https://github.com/downloads/alonbl/openvpn/timebench.exe > > On Wed, Feb 22, 2012 at 6:12 PM, Alon Bar-Lev <alon.bar...@gmail.com> wrote: >> Hello all, >> >> There is an abnormality in the openvpn sources I want to resolve. >> >> In windows there is own implementation of gettimeofday(). >> In the past there was no gettimeofday(), so we used performance counters, >> then James optimize it to reduce CPU consumption. >> >> Unlike in the past, mingw does provide this function these days. >> The question is if it is good enough. >> >> There is also a note: >> /* on WIN32, gettimeofday is faster than time(NULL) */ >> >> I am not sure about any of these, can you please try to run the >> benchmark and report back the results? >> It must be compiled using mingw, either at cygwin or at linux. >> >> Thanks, >> Alon