Sleep function in c in windows. Does a function with better precision exist?
问题 I was wondering if anyone knew of a better sleep function that could be used in windows in c, other than Sleep(), which takes a millisecond input and only guarantees that the input is the minimum amount of time that elapses. I am passing in 1 millisecond, but actually getting a 15-16 millisecond delay. Is there any way to accurately set a specified sleep time? 回答1: No, not really. When you tell your program to sleep, you're giving up the processor and letting the operating system decide what