1) I'll try to check which version of winpthreads is installed by msys2. (rats, someone just "borrowed" the Surface Book Pro. Grrr.) :-)
2) that is almost identical to the wrapper I wrote, except I just used a FILETIME struct and copied low/high as per https://msdn.microsoft.com/en-us/library/windows/desktop/ms724284(v=vs.85).aspx I'm guessing ct is a union that resolves the alignment issue. -----Original Message----- From: LRN [mailto:[email protected]] Sent: June-14-17 6:32 PM To: [email protected] Subject: Re: [Mingw-w64-public] MinGW-w64 clock_gettime() On 6/14/2017 10:33 PM, McLachlan, Donald (IC) wrote: > Hi, > > 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? > This is what git version of winpthreads does in clock_gettime (not sure which version is the latest in msys2): case CLOCK_REALTIME: { GetSystemTimeAsFileTime(&ct.ft); t = ct.u64 - DELTA_EPOCH_IN_100NS; tp->tv_sec = t / POW10_7; tp->tv_nsec = ((int) (t % POW10_7)) * 100; return 0; } -- O< ascii ribbon - stop html email! - www.asciiribbon.org ------------------------------------------------------------------------------ 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
