STINNER Victor <vstin...@python.org> added the comment:

time.sleep() is now implemented with a waitable timer and 
WaitForMultipleObjects() on Windows. It uses _PyOS_SigintEvent() so it can be 
interrupted with CTRL+C.

commit 58f8adfda3c2b42f654a55500e8e3a6433cb95f2
Author: Victor Stinner <vstin...@python.org>
Date:   Wed Sep 22 16:09:30 2021 +0200

    bpo-21302: time.sleep() uses waitable timer on Windows (GH-28483)
    
    On Windows, time.sleep() now uses a waitable timer which has a
    resolution of 100 ns (10^-7 sec). Previously, it had a solution of 1
    ms (10^-3 sec).
    
    * On Windows, time.sleep() now calls PyErr_CheckSignals() before
      resetting the SIGINT event.
    * Add _PyTime_As100Nanoseconds() function.
    * Complete and update time.sleep() documentation.
    
    Co-authored-by: Livius <egyszer...@freemail.hu>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29971>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to