title: Alternatives to Thread.Sleep()
body: <p>Every N minutes we want to run through a list of tasks.  So we've created a task executor with a </p>
  
  <pre><code>do { DoWork(); }while(!stopRequested)
  </code></pre>
  
  <p>Now we want to have a pause between work cycles.  Everyone seems to think Thread.Sleep() is the devil.  I've seen mention of using Monitor/Event stuff but we don't have someone else telling us to do work.  We just want to do stuff every N minutes like clockwork.</p>
  
  <p>So is there an alternative or have I found a valid use of Thread.Sleep?</p>
  
  <p>Someone in another post mentioned WaitHandle.WaitOne() as an alternative but you can't call that from a non-static method apparently?  Or at least I can't because I get a compile time error of..</p>
  
  <blockquote>
    <p>An object reference is required for
    the non-static field, method, or
    property
    'System.Threading.WaitHandle.WaitOne(System.TimeSpan)'</p>
  </blockquote>