Mar-25-2019, 01:56 AM
Hi, I have a program that runs on both windows and Linux as a continuous thread with 1 millisecond interval, using time.sleep(0.001)
My programs seem to run slow on Windows than in Linux. After some finds, I noticed this:
"The time.sleep() function uses the underlying operating system's sleep() function. Ultimately there are limitations of this function. For example on a standard Windows installation, the smallest interval you may sleep is 10 - 13 milliseconds. The Linux kernels tend to have a higher tick rate, where the intervals are generally closer to 1 millisecond"
Is there any way to achieve the close to 1 milliseconds on Windows?
Please help me..
Thanks
kwekey
My programs seem to run slow on Windows than in Linux. After some finds, I noticed this:
"The time.sleep() function uses the underlying operating system's sleep() function. Ultimately there are limitations of this function. For example on a standard Windows installation, the smallest interval you may sleep is 10 - 13 milliseconds. The Linux kernels tend to have a higher tick rate, where the intervals are generally closer to 1 millisecond"
Is there any way to achieve the close to 1 milliseconds on Windows?
Please help me..
Thanks
kwekey