[issue32025] Add time.thread_time()

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: I opened bpo-32093 for macOS. I close this one. Nice enhancement, I already like this new clock ;-) -- components: +FreeBSD -Library (Lib) nosy: +koobs resolution: -> fixed stage: patch review -> resolved status: open ->

[issue32025] Add time.thread_time()

2017-11-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Should I leave this open for you to work on the macOS implementation, Victor? -- ___ Python tracker

[issue32025] Add time.thread_time()

2017-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 4bd41c9b52ea0c730e9e294caaf003e54c088c6e by Antoine Pitrou in branch 'master': bpo-32025: Add time.thread_time() (#4410) https://github.com/python/cpython/commit/4bd41c9b52ea0c730e9e294caaf003e54c088c6e --

[issue32025] Add time.thread_time()

2017-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 15/11/2017 à 22:06, STINNER Victor a écrit : > > I can work on the macOS implementation, once your PR will be merged. Great! -- ___ Python tracker

[issue32025] Add time.thread_time()

2017-11-15 Thread STINNER Victor
STINNER Victor added the comment: I can work on the macOS implementation, once your PR will be merged. -- ___ Python tracker

[issue32025] Add time.thread_time()

2017-11-15 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4359 stage: -> patch review ___ Python tracker ___

[issue32025] Add time.thread_time()

2017-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 15/11/2017 à 02:48, STINNER Victor a écrit : > > Would it be possible to not provide the function if it's not supported by a > platform? Probably, yes. > Do you know platforms which don't support time.thread_time()? Any POSIX platform

[issue32025] Add time.thread_time()

2017-11-14 Thread STINNER Victor
STINNER Victor added the comment: It seems like macOS doesn't implement CLOCK_THREAD_CPUTIME_ID but provides thread_info() which can be used by suming user and system times. -- ___ Python tracker

[issue32025] Add time.thread_time()

2017-11-14 Thread STINNER Victor
STINNER Victor added the comment: > On other platforms, it can simply raise NotImplementedError. Would it be possible to not provide the function if it's not supported by a platform? Do you know platforms which don't support time.thread_time()? Do you want to add

[issue32025] Add time.thread_time()

2017-11-14 Thread Antoine Pitrou
New submission from Antoine Pitrou : Currently, the time module has time.process_time(), a cross-platform function for getting per-process elapsed CPU time. Similarly, we could expose time.thread_time(), to get per-thread elapsed CPU time. On a modern POSIX platform, it can