title: Timer is firing before the elapsed Interval
body: <p>I'm trying to create a Windows Form application that searches for a string and has three possible scenarios:</p>
  
  <ol>
  <li>String 1 found - wait</li>
  <li>String 2 found - stop</li>
  <li>Else - Perform action and wait 1 minute</li>
  </ol>
  
  <p>I am encountering my problem only on the times when it is expected to wait. When this happens, the newTimer_Tick starts to tick every second. I have tried disabling the timer when it ticks and a few other things but none appeared to work. Below is the code:</p>
  
  <pre><code>public void Action(string result)
  {
      if (result.Contains("string1"))
      {
          // Check again in 10 + x seconds
          int n = new Random().Next(0, 5000);
          int newtime = 10000 + n;
          newTimer.Tick += new EventHandler(newTimer_Tick);
          newTimer.Interval = newtime;
          newTimer.Enabled = true;
      }
      else if (result.Contains("string2"))
      {
          // Turn off
          newTimer.Enabled = false;
      }
      else
      {
          // Perform action and tick again in 1min + x seconds
          action1();
  
          int n = new Random().Next(0, 5000);
          int newtime = 600000 + n;
          newTimer.Tick += new EventHandler(newTimer_Tick);
          newTimer.Interval = newtime;
          newTimer.Enabled = true;
      }
  }
  
  private void newTimer_Tick(object sender, EventArgs e)
  {
      Action( result );
  }
  </code></pre>
  
  <p>What have I done wrong?</p>