Hi,

I've recently followed 
https://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2 
 and installed MSYS2 and then installed gcc.  This appears to be MinGW-w64.  Is 
this correct?

I was hoping to use clock_gettime(CLOCK_REALTIME, &ts) for high resolution 
synchronized timestamps.  But it appears the time reported is only updated 
every system tick (~15.6 ms).  Is this correct?

If so, why isn't clock_gettime(CLOCK_REALTIME, &ts) just implemented as a 
wrapper around GetSystemTimePreciseAsFileTime() and adjusting the epoch to Jan 
1 1970?

I've written a similar wrapper function and I found 
GetSystemTimePreciseAsFileTime() usually takes 11 ns per call and I usually see 
time "steps" of  300 or 400 ns (worst case was about 1 ms). N.B. This was with 
NTP running so the big step could be a time adjustment.

I've not checked the resolution of clock_gettime(CLOCK_MONOTONIC, ) for high 
resolution unsynchronized timestamps, but I guess that could be also easily be 
implemented as a wrapper (around QueryPerformanceCounter()).

Don


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to