Re: [Mingw-users] clock_gettime
-----BEGIN PGP SIGNED MESSAGE-----
Apologies for the delayed reply ... this seems to have slipped under
> On 2017-05-29 00:38, DAVENPORT, MARC wrote:
>> Is there any chance of clock_gettime being implemented in MinGW?
I think I've said this before; (if not, I've certainly alluded to it):
your best chance of getting such requests accepted is to file them as
"Feature Requests", at https://sourceforge.net/p/mingw/bugs/new/, and
then invite other users to vote for them, (by posting a notification
>> 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 ...
It would, if the API is to be supported; prior to POSIX.1-2008, the
entire API was optional, and even now all but CLOCK_REALTIME appear to
remain so. In any case, right now, I would be able to offer tentative
implementations for CLOCK_REALTIME and CLOCK_MONOTONIC, but...
>> and clock_getcpuclockid.
...this may NOT be required, because a) it is required only when the
CLOCK_PROCESS_CPUTIME_ID option (_POSIX_CPUTIME feature) is supported,
and b) I do not currently have even a tentative implementation for it.
Notwithstanding the lack of enthusiasm exhibited here, if you'd care to
raise the appropriate "Feature Request" ticket, I'll attach my tentative
implementation for consideration.
On 29/05/17 08:30, Peter Rosin replied:
> Hmm, their CLOCK_MONOTONIC wraps, and rather quickly too on some
> machines ; it's nothing more than a dirty hack as it's not
> monotonic at all.
> Unless I'm missing something non-obvious...
I don't know. I haven't looked at their implementation, (nor will I),
so I cannot comment. My tentative implementation does not appear to
exhibit any such trait: indeed, with a reported update frequency of
3,579,545 ticks per second, (on my GNU/Linux hosted WinXP VM), and a
64-bit limit of 2^63 ticks before wrap-around, it should outlive any
likely uptime cycle of the host, (or any of us, for that matter)!
Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
-----END PGP SIGNATURE-----
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
MinGW-users mailing list
This list observes the Etiquette found at
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
You may change your MinGW Account Options or unsubscribe at: