title: Save a specific timer tick
body: <p>I am creating a game in Winforms (c#) and i have made a Timer to have track of the ongoing time and the timer stops when the game stops. But i havent succeded to save the time the timers shows when the game stops and post it.</p>
  
  <p>This is how i have build up the Timer-function.</p>
  
  <pre><code>private Timer timers;
  public event EventHandler Tick;
  
  StartGame()
  {
    ...
    timers = new Timer();
    timers.Interval = 1000;
    timers.Tick += new EventHandler(TimerTick);
    timers.Enabled = true;
  }
  
  private void TimerTick(object sender, EventArgs e) 
  {
    Time++;
    OnTick();
  }
  
  protected void OnTick() 
  {
     if (Tick != null) 
     {
        Tick(this, new EventArgs());
     }     
  }
  </code></pre>