title: Backgroundworker Sleep to reduce CPU
body: <p>I have a task that i want to run over and over. I want to call this as fast as possible however i want to keep my cpu cycles low.  I have read using Sleep in a backgroundworker is not the best choice.  However without sleep my cpu stays about 55% percent.  I have an example of my source below.  If sleep is appropriate how do you go about choosing the best time to sleep, as you can see from my results below i get different results based on how long i sleep.  Can someone let me know what best practice is when doing something similar</p>
  
  <pre><code>BackgroundWorker _Worker = new BackgroundWorker()
  {
    WorkerReportsProgress = true,
    WorkerSupportsCancellation = true
  };
  
  void Worker_DoWork(object sender, DoWorkEventArgs e)
  {
      // do my task here
  
      // if i uncomment one of the Sleep below I reduce the CPU like so
      // no sleep             CPU = 52-58%
      // Thread.Sleep(1);     CPU = 09-15%
      // Thread.Sleep(10);    CPU = 02-03%
      // Thread.Sleep(100);   CPU = 00-01%
  }
  
  void Worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
  {
      if (e.Cancelled) { return; }
  
      _Worker.RunWorkerAsync();
  }
  </code></pre>