Message365775
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." |
|
Date |
User |
Action |
Args |
2020-04-04 19:35:49 | vstinner | set | recipients:
+ vstinner, benjamin.peterson, jerome.hamm |
2020-04-04 19:35:49 | vstinner | set | messageid: <1586028949.65.0.056795132209.issue40174@roundup.psfhosted.org> |
2020-04-04 19:35:49 | vstinner | link | issue40174 messages |
2020-04-04 19:35:49 | vstinner | create | |
|