Message159662
| Author |
vstinner |
| Recipients |
Arfrever, lemburg, neologix, pitrou, python-dev, vstinner |
| Date |
2012年04月29日.23:54:01 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1335743642.42.0.704235430298.issue14428@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> You mean that process_time() doesn't return seconds?
Yes, dt is not a number of seconds in the following example:
t1=time.process_time(); (...); t2=time.process_time(); dt=t2-t1
> I see two options: either increase the total running time,
> to make it really likely you'll get a chance to run
> (or decrase the lower threshold), or use times(2), and
> check the result against that (does Windows have such a syscall?).
I wrote the test to check if time.process_time() measures the total CPU of the process, and not the CPU time of only the current thread.
I'm tired of this PEP, so I just removed the test. I don't think that it is really interesting and it looks difficult to write a reliable test. |
|