c# Thread.Sleep not sleeping for “at least…” milliseconds

Putting a thread to sleep tells the thread to yield to the system for a given time. This time is only as accurate as the hardware clocks and the time resolution of the system. Hardware clocks are minutely susceptible to temperature and voltage variations and if the resolution of the clock is less than the resolution of your request, this could result in an early or late resume of thread operation.

Leave a Comment