McLachlan, Donald (IC)
2017-06-14 19:33:16 UTC
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
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