blog vipa

blog vipa
mój dzień to 3 filiżanki kawy

.NET C# Timers

marzec 18, 2007 | 13:55

The simplest method to add non-blocking ticker in C#:

C#:
  1. using System.Threading;
  2. public Clock()
  3. {
  4.    System.Threading.Timer tmrThreadingTimer = new
  5.    System.Threading.Timer(new
  6.       TimerCallback(tmrThreadingTimer_TimerCallback),
  7.       null, System.Threading.Timeout.Infinite, 1000);
  8.    tmrThreadingTimer.Change(0, 1000);
  9. }

Czytaj resztę wpisu »