-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin #79883
Comments
Finally since the release of OSX 10.12 the equivalent from the FreeBSD and OpenBSD "CLOCK_UPTIME" is available on Darwin under the name "CLOCK_UPTIME_RAW": CLOCK_UPTIME FreeBSD [1]: CLOCK_UPTIME OpenBSD [2]: CLOCK_UPTIME_RAW Darwin [3]: It would be useful to have it available on time module [4] for this platform. As the behaviour is equivalent, maybe it can be assigned to the existing time.CLOCK_UPTIME funtion. Thanks, [1] - https://www.freebsd.org/cgi/man.cgi?query=clock_gettime |
I am working on this. |
Nah, in Python we map directly to OS constant and don't try to be smart. It's up to the user of these constants to make their own choice. Use Python functions for portable behavior: time.monotonic(), time.perf_counter(), etc. |
Joannah Nanjekye added time.CLOCK_UPTIME_RAW to the master branch (future Python 3.8). We don't add feature to stable versions (like 3.7), so I close the issue. Thanks Ricardo Fraile for the report, I wasn't aware of this clock ;-) Note: Until Python 3.8 is released, you can easily hardcode the constant in your application. Such constant rarely change. |
Impressive response time, thanks team! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: