static void Main(string[] args) { AsynchronousTimer printLetter = new AsynchronousTimer(PrintLetterOnConsole, 5, 500); printLetter.Execute(); AsynchronousTimer printNumber = new AsynchronousTimer(PrintNumberOnConsole, 3, 1000); printNumber.Execute(); }
public static void Main(string[] args) { Action<object, EventArgs> getTime = GetTime; var timer = new AsynchronousTimer(getTime, 10, 1000); timer.OnRun += GetTime; timer.Run(); }
public static void Main(string[] args) { Action<int, int> action = OnTick; AsynchronousTimer aSyncTimer = new AsynchronousTimer(5, action, 1000); }
static void Main() { AsynchronousTimer asynchronousTimer = new AsynchronousTimer(PrintDateTimeMilliseconds, 10, 1000); asynchronousTimer.Run(); }
static void Main() { AsynchronousTimer asyncTimer = new AsynchronousTimer(DoSomething, 15, 1000); asyncTimer.StartAsync(); }