Message146347
| Author |
ellioh |
| Recipients |
ellioh |
| Date |
2011年10月25日.09:37:06 |
| SpamBayes Score |
8.075008e-06 |
| Marked as misclassified |
No |
| Message-id |
<1319535427.57.0.472664899853.issue13261@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
time.clock () has very poor time resolution on Linux (tested on Ubuntu 11.04).
The result of call to clock () changes once per several seconds. On the other side, on Windows it provides very good resolution.
Here is a doctest that fails on Linux:
"""
>>> from time import sleep
>>> prev = clock ()
>>> res = True
>>> for i in xrange(10):
... sleep(0.15)
... next = clock ()
... res = res and (next - prev) > 0.1
... prev = next
>>> print res
True
"""
Currently on Linux I am using a workaround that is attached to the issue. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年10月25日 09:37:07 | ellioh | set | recipients:
+ ellioh |
| 2011年10月25日 09:37:07 | ellioh | set | messageid: <1319535427.57.0.472664899853.issue13261@psf.upfronthosting.co.za> |
| 2011年10月25日 09:37:06 | ellioh | link | issue13261 messages |
| 2011年10月25日 09:37:06 | ellioh | create |
|