title: Why is Thread.Sleep is not precise for long durations?
body: <p>I have a service written in C#. Service is active around the clock but one thread sleeps via Thread.Sleep till a predetermined time - typically 9PM - 11pm - to perform some housekeeping tasks. First time service starts, it calculates time span in mseconds till the housekeeping time and calls Thread.Sleep using that time span. Next time the thread simply calls Thread.Sleep(24*60*60*1000) to sleep 24 hours. </p>
  
  <p>It works just  fine except a <b>single installation</b> when Sleep wakes few minutes earlier - 5-8 minutes earlier according to the trace log. Over several weeks, housekeeping time shifts few hours. I can expect that the housekeeping time can shift forward - not backwards. Wondering if anyone can have an explanation.  I must admit that I am not looking for a different solution to fix the problem - just trying to explain the behavior.</p>