Exemple #1
0
        public static void Main()
        {
            AsyncTimer messageTimer = new AsyncTimer(printMessage, 100, 2000);
            messageTimer.Start();

            AsyncTimer beepTimer = new AsyncTimer(beep, 50, 2500);
            beepTimer.Start();
        }
        static void Main(string[] args)
        {
            AsyncTimer timer1 = new AsyncTimer(Work1, 1000, 10);

            timer1.Start();
            AsyncTimer timer2 = new AsyncTimer(Work2, 500, 20);

            timer2.Start();
        }
        static void Main()
        {
            AsyncTimer printGreen = new AsyncTimer(PrintGreenNumberOnConsole, 7, 2000);
            printGreen.ExecuteAction();

            AsyncTimer printRed = new AsyncTimer(PrintRedNumberOnConsole, 10, 1000);
            printRed.ExecuteAction();

            AsyncTimer beep = new AsyncTimer(MakeSound, 10, 1500);
            beep.ExecuteAction();
        }
Exemple #4
0
        static void Main(string[] args)
        {
            AsyncTimer t1 = new AsyncTimer(20, 100, SayBau);
            AsyncTimer t2 = new AsyncTimer(20, 50, SayMqu);

            t1.run();
            t2.run();
            for (int i = 0; i < 20; i++)
            {
                Console.WriteLine("Minkee az ne sa spiram");
                Thread.Sleep(100);
            }
        }
Exemple #5
0
        static void Main()
        {
            AsyncTimer printGreen = new AsyncTimer(PrintGreenNumberOnConsole, 7, 2000);

            printGreen.ExecuteAction();

            AsyncTimer printRed = new AsyncTimer(PrintRedNumberOnConsole, 10, 1000);

            printRed.ExecuteAction();

            AsyncTimer beep = new AsyncTimer(MakeSound, 10, 1500);

            beep.ExecuteAction();
        }
Exemple #6
0
        static void Main()
        {
            AsyncTimer asyncTimer = new AsyncTimer(TestMethod, 2000, 20);

            asyncTimer.Start();
        }