[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

Benjamin Szőke report at bugs.python.org
Sat Oct 9 21:14:26 EDT 2021


Benjamin Szőke <egyszeregy at freemail.hu> added the comment:

Absolute timeout implementation via SetWaitableTimer() and GetSystemTimePreciseAsFileTime() is always better because it can reduce the "waste time" or "overhead time" what is always exist in any simple interval sleep implementation. Moreover, it is the only one which is eqvivalent with clock_nanosleep() implementation of Linux which is now the most state of the art implementation for precise sleeping.

So, my opinion is that absolute timeout implementation could be the most modern and sustainable for future python.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21302>
_______________________________________


More information about the Python-bugs-list mailing list