title: Wait for n seconds, then next line of code without freezing form
body: <p>Hi I am trying to find a method of waiting a number of milliseconds before moving to the next line of code,</p>
  
  <p>I have looked into Thread.Sleep but this will freeze the main form, I would like this to remain active.</p>
  
  <p>I tried timers and stopwatches and both freeze the main form when they should be posting to a console when they tick. </p>
  
  <p>I couldn't find a way of using task.delay or background worker in the wait I wanted either.</p>
  
  <p>Pseudo Code:</p>
  
  <pre><code>Wait 2 - 6 seconds
  Log "waiting"
  Log "waiting"
  Log "waiting"
  Stop Waiting - Run next line of code.
  </code></pre>
  
  <p>The methods I have tried just freeze up the form and fill the log afterwards, I just want a simple method of waiting without freezing the form and without having to deal with events being called which would mean the next line isn't run. </p>
  
  <p>Any help would be awesome because I am still new to c# and its been driving me a bit mad :(</p>