title: .NET Redraw at 60 FPS?
body: <p>I've got some animations running in an OpenGL context window, so I need to constantly redraw it. So I came up with the following code:</p>
  <pre><code>private void InitializeRedrawTimer()
  {
      var timer = new Timer();
      timer.Interval = 1000 / 60;
      timer.Tick += new EventHandler(timer_Tick);
      timer.Start();
  }
  
  private void timer_Tick(object sender, EventArgs e)
  {
     glWin.Draw();
  }
  </code></pre>
  <p>That only gives me 40 FPS though. If I set the interval to 1 ms however, I can achieve 60. So where did the other 20 ms go? Is that just due to poor accuracy of the timer or what? What if I wanted to let my program run as fast as possible, is there a way to continuously call the draw func?</p>