Skip to content
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

macOS: implement time.thread_time() using thread_info() #76274

Closed
vstinner opened this issue Nov 20, 2017 · 3 comments
Closed

macOS: implement time.thread_time() using thread_info() #76274

vstinner opened this issue Nov 20, 2017 · 3 comments
Labels

Comments

@vstinner
Copy link
Member

BPO 32093
Nosy @ronaldoussoren, @pitrou, @vstinner, @ned-deily

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:

assignee = None
closed_at = <Date 2018-09-19.23:51:04.999>
created_at = <Date 2017-11-20.17:20:53.186>
labels = ['OS-mac', '3.7']
title = 'macOS: implement time.thread_time() using thread_info()'
updated_at = <Date 2018-09-19.23:51:04.997>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2018-09-19.23:51:04.997>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2018-09-19.23:51:04.999>
closer = 'vstinner'
components = ['macOS']
creation = <Date 2017-11-20.17:20:53.186>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 32093
keywords = []
message_count = 3.0
messages = ['306569', '306704', '325831']
nosy_count = 4.0
nosy_names = ['ronaldoussoren', 'pitrou', 'vstinner', 'ned.deily']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue32093'
versions = ['Python 3.7']

@vstinner
Copy link
Member Author

bpo-32025 added time.thread_time() function. On macOS, CLOCK_THREAD_CPUTIME_ID is not available. I propose to add a macOS implementation using thread_info(): return the sum of user and system times.

@vstinner vstinner added 3.7 (EOL) end of life OS-mac labels Nov 20, 2017
@ronaldoussoren
Copy link
Contributor

CLOCK_THREAD_CPUTIME_ID should be available on macOS 10.12 and later (which is also when clock_gettime was introduced).

I'm not sure if it is worthwhile to implement this fairly specialised function for older macOS releases due to the maintenance cost.

@vstinner
Copy link
Member Author

I'm not sure if it is worthwhile to implement this fairly specialised function for older macOS releases due to the maintenance cost.

Ok. I close the issue.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants