title: How do I trigger a method to run after x seconds?
body: <p>I am working on a C# Windows Forms application where I need the method to pause for 30 seconds until it continues on to the next line of code. I have tried <code>Thread.Sleep()</code> which wasn't suitable for this application and I've understood that I should use some sort of timer instead. I have searched a lot but I can't figure out how to implement timers. </p>
  
  <p>My code is below and could anyone show me how I should implement the timer. I have made a comment on where I want the method to pause.</p>
  
  <pre><code>private void start_Vid_Click(object sender, EventArgs e)
  {
      if (video.State != StateFlags.Running)
      {
          viewport.Visible = true;
          video.Play();
      }
  
      //Here I want to wait 30 seconds until the next line of code is triggered
  
      viewport.Visible = false;
      viewport2.Visible = true;
      pictureBox1.Visible = true;
      start_Webc(); 
      video2.Play();
  }
  </code></pre>