title: What are the best practices for doing a task after a certain time interval?
body: <p>I have a Windows Application. We have implemented AutoSave functionality as background process.</p>
  
  <p>Sample code is as below:</p>
  
  <pre><code>While(1)
  {
      Thread.Sleep(60000) // 1 minute sleep
      DoAutoSaveAllControls();
  }
  </code></pre>
  
  <p>I think this is bad functionality. Correct me if I am wrong. But, I want to improve performance and do this task after certain time interval, without doing <code>Sleep</code>.
  Also, is it good to do this in background process?</p>