Esempio n. 1
0
 static void Main()
 {
     Action<int> action = Console.WriteLine;
     AsyncTimer timer = new AsyncTimer(action, 10, 500);
     timer.Start();
     Console.ReadLine();
 }
Esempio n. 2
0
        static void Main()
        {
            AsyncTimer printLetter = new AsyncTimer(PrintLetterOnConsole, 5, 500);
            printLetter.Execute();

            AsyncTimer printNumber = new AsyncTimer(PrintNumberOnConsole, 3, 1000);
            printNumber.Execute();
        }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            var test = new AsyncTimer();

            //test.OnPollEvent += Blah;
            test.Start();

            Console.ReadKey();

            Console.WriteLine("Cancelling...");

            test.Stop();

            Console.ReadKey();
        }
Esempio n. 5
0
 static void Main()
 {
     AsyncTimer tester1 = new AsyncTimer(Example1, 30, 1000);
     tester1.Execute();
 }