static void Main(string[] args) { Action<int> countMillisecs = (ms) => { Console.WriteLine($"{ms}ms passed..."); }; AsyncTimer timer = new AsyncTimer(countMillisecs, 5, 1000); timer.Start(); }
static void Main(string[] args) { Action <int> countMillisecs = (ms) => { Console.WriteLine($"{ms}ms passed..."); }; AsyncTimer timer = new AsyncTimer(countMillisecs, 5, 1000); timer.Start(); }
static void Main(string[] args) { AsyncTimer timer1 = new AsyncTimer(SayHello, 10, 1000); timer1.Start(); AsyncTimer timer2 = new AsyncTimer(PointlessMethod, 5, 2000); timer2.Start(); }
static void Main(string[] args) { var timer = new AsyncTimer(() => Console.WriteLine("Halo"), 10, 1000); timer.Start(); while (!timer.IsReady) { } }
static void Main(string[] args) { AsyncTimer first = new AsyncTimer(1000, 10, FirstStram); first.Start(); AsyncTimer second = new AsyncTimer(750, 15, SecondStream); second.Start(); AsyncTimer third = new AsyncTimer(550, 20, ThirdStream); third.Start(); }
static void Main(string[] args) { AsyncTimer print = new AsyncTimer(Print, 10, 1000); print.Start(); AsyncTimer beep = new AsyncTimer(BeeP, 10, 500); beep.Start(); }
public static void Main() { AsyncTimer runningTimer = new AsyncTimer(Announce, 10, 1000); runningTimer.Start(); Thread.Sleep(2020); Console.WriteLine("This is main program execution (delayed 2 sec.) not interupted by timer"); Thread.Sleep(2500); Console.WriteLine("This is again main program execution not interupted by timer"); Console.ReadKey(); }
static void Main() { AsyncTimer timer1 = new AsyncTimer(method1, 500, 10); timer1.Start(); AsyncTimer timer2 = new AsyncTimer(method2, 1000, 10); timer2.Start(); }
static void Main(string[] args) { AsyncTimer timer1 = new AsyncTimer(Work1, 1000, 10); timer1.Start(); AsyncTimer timer2 = new AsyncTimer(Work2, 900, 10); timer2.Start(); }
public static void Main() { AsyncTimer timer = new AsyncTimer(Action, 10, 1000); timer.Start(); }