STINNER Victor <vstin...@python.org> added the comment:
Python has a long history (30 years). time.time() had multiple implementations. When I added time.monotonic() in Python 3.3, it was optional. I changed that in Python 3.5: time.monotonic() is now always available. https://docs.python.org/dev/library/time.html#time.monotonic time.monotonic() has multiple implementations: * Windows: GetTickCount64() * macOS (Darwin): mach_absolute_time() * HP-UX: gethrtime() * Solaris: clock_gettime(CLOCK_HIGHRES) * Otherwise: clock_gettime(CLOCK_MONOTONIC) So far (since Python 3.5), no one complained about build error on any platform. It looks safe in practice to expect clock_gettime() to be available. I suggest to close this issue, and only change the code is Python fails to build on a specific platform. By the way, glibc 2.31 release notes: "We plan to remove the obsolete function ftime, and the header <sys/timeb.h>, in a future version of glibc." ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40174> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com