How to delay until a next increment of time occurs ?
Dietmar Schwertberger
maillist at schwertberger.de
Wed Nov 13 17:36:45 EST 2019
On 13.11.2019 23:20, Dennis Lee Bieber wrote:
> For Windows it may require coding a busy-wait sleep function using the
> high-performance counter and computing a counter value (modulo?) on which
> to exit the loop.
time.perf_counter() is using this on Windows. I'm just worried about
floating point limitations on older Python versions.
From Python 3.7 onwards, there's time.perf_counter_ns(), but even then
it would be nice if it was just possible to reset the perf_counter.
Regards,
Dietmar
More information about the Python-list
mailing list