Message 403581 - Python tracker

Message403581

Author Livius
Recipients Livius, akira, eryksun, python-dev, shankarunni, vstinner, yselivanov
Date 2021-10-10.10:37:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1633862236.17.0.885183224854.issue21302@roundup.psfhosted.org>
In-reply-to
Content
It is not true that there are no benefits. Absolute timeout using can reduce the overhead time of any variable and object intialization cost before the WaitForMultipleObjects() which will perform the real sleeping via blocking wait in pysleep(). GetSystemTimePreciseAsFileTime() must be call at the first line as much as it can in pysleep(). This is the same implementation in Linux via clock_nanosleep().

So, to using absolute timeout and GetSystemTimePreciseAsFileTime() can improves the accuracy of the desired sleep time. For example if sleep = 2.0 sec then real relative sleep time = 2.001234 sec, but absolute sleep time = 2.000012 sec.

Benefits are in not the technicaly backgorund, rather it is in the usecase.
History
Date User Action Args
2021-10-10 10:37:16Liviussetrecipients: + Livius, vstinner, akira, python-dev, yselivanov, eryksun, shankarunni
2021-10-10 10:37:16Liviussetmessageid: <1633862236.17.0.885183224854.issue21302@roundup.psfhosted.org>
2021-10-10 10:37:16Liviuslinkissue21302 messages
2021-10-10 10:37:16Liviuscreate