This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients Red Glyph, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019-08-14.20:47:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565815665.05.0.858493151151.issue37859@roundup.psfhosted.org>
In-reply-to
Content
Try this:

while time.process_time() < 0.5:
    print('.', flush=True, end='')

Or:

>>> time.process_time()
0.03125
>>> len(str(2**500_000))
150515
>>> time.process_time()
0.484375


Basically, process_time() (and process_time_ns()) measure CPU time used by the process, and you aren't making the CPU do anything between your checks.
History
Date User Action Args
2019-08-14 20:47:45zach.waresetrecipients: + zach.ware, paul.moore, tim.golden, steve.dower, Red Glyph
2019-08-14 20:47:45zach.waresetmessageid: <1565815665.05.0.858493151151.issue37859@roundup.psfhosted.org>
2019-08-14 20:47:45zach.warelinkissue37859 messages
2019-08-14 20:47:44zach.warecreate