static void Main() { Action<int> action = Console.WriteLine; AsyncTimer timer = new AsyncTimer(action, 10, 500); timer.Start(); Console.ReadLine(); }
static void Main() { AsyncTimer printLetter = new AsyncTimer(PrintLetterOnConsole, 5, 500); printLetter.Execute(); AsyncTimer printNumber = new AsyncTimer(PrintNumberOnConsole, 3, 1000); printNumber.Execute(); }
static void Main() { AsyncTimer a = new AsyncTimer(MethodOne, 20, 500); AsyncTimer b = new AsyncTimer(MethodTwo, 10, 1000); for (int i = 0; i < b.countTicks; i++) { b.tick(); Thread.Sleep(b.milliSeconds); } }
static void Main(string[] args) { var test = new AsyncTimer(); //test.OnPollEvent += Blah; test.Start(); Console.ReadKey(); Console.WriteLine("Cancelling..."); test.Stop(); Console.ReadKey(); }
static void Main() { AsyncTimer tester1 = new AsyncTimer(Example1, 30, 1000); tester1.Execute(); }