Message159662
> 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. |
|
Date |
User |
Action |
Args |
2012-04-29 23:54:02 | vstinner | set | recipients:
+ vstinner, lemburg, pitrou, Arfrever, neologix, python-dev |
2012-04-29 23:54:02 | vstinner | set | messageid: <1335743642.42.0.704235430298.issue14428@psf.upfronthosting.co.za> |
2012-04-29 23:54:01 | vstinner | link | issue14428 messages |
2012-04-29 23:54:01 | vstinner | create | |
|