SamKr
11/19/2014 - 2:28 PM

Timer

Timer

private System.Timers.Timer aTimer = new System.Timers.Timer();

aTimer = new System.Timers.Timer();
aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
aTimer.Interval = 2000; // Elke 2 seconden
aTimer.Enabled = true;

private void OnTimedEvent(object source, ElapsedEventArgs e)
{
  // do stuff
}