bpo-21302: Add Waitable timer implementation for time.sleep() in Windows by Livius90 · Pull Request #28341 · python/cpython
and others added 30 commits
September 1, 2021 14:41In calling clock_nanosleep() EINTR is not stored in errno. Need to use return value of clock_nanosleep()/select() for checking it.
Unix operating systems eg: Linux, macOS, FreeBSD etc. time.sleep() has a resolution of nanoseconds with using clock_nanosleep() or nanosleep() function.
Waitable timer is 100 nsec resolution. Now, seconds to nanosec conversion is limited in usec, soon will come the next developing part to improve it in next commit.
Waitable timer resolution is 100 nsec but it is limited to 1 usec by round ceiling, moreover sleep for lower then 1 milisec is not possible in Win32 API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters