|
From: Peter R. <pe...@ly...> - 2017-05-29 07:30:21
|
On 2017-05-29 00:38, DAVENPORT, MARC wrote: > Is there any chance of clock_gettime being implemented in MinGW? MinGW64 has it but I don't like MinGW64. Source code is public domain. See link below. It would also need at least clockid_t and clock_getcpuclockid. > > https://github.com/mirror/mingw-w64/blob/master/mingw-w64-libraries/winpthreads/src/clock.c#L109 Hmm, their CLOCK_MONOTONIC wraps, and rather quickly too on some machines [1]; it's nothing more than a dirty hack as it's not monotonic at all. Unless I'm missing something non-obvious... Cheers, Peter [1] I've seen machines wrap the performance counter within the hour, albeit many years ago, but the non-handling of the fundamental timer wrap problem persists. |