title: Timer in Windows Service not firing ElapsedEventHandler
body: <p>I have a windows service written in C# that executes a method correctly.  I added a timer to schedule the method execution and it doesn't seem to fire the ElapsedEventHandler event.</p>
  
  <pre><code>System.Timers.Timer timer = new System.Timers.Timer();
  
  public LabelService()
          {
              InitializeComponent();
              timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
          }
  
  
  public void SetTimer()
          {
              DateTime nextRunTime = GetNextRunTime();
              var ts = nextRunTime - DateTime.Now;
              timer.Interval = ts.TotalMilliseconds;
              timer.AutoReset = false;
              timer.Start();
          }
  
  void timer_Elapsed(object source, ElapsedEventArgs e)
          {
             // ** never gets here **
              timer.Stop();
                // run some code
              SetTimer();
          }
  </code></pre>
  
  <p>I can run and hit a breakpoint at  <code>timer.Start();</code>  so I know that's being done, but it never falls into the timer_Elapsed method.  (For testing I change <code>ts.TotalMilliseconds</code> to 1000)  Any ideas?</p>