コード例 #1
0
        static void Main(string[] args)
        {
            Action<int> countMillisecs = (ms) => { Console.WriteLine($"{ms}ms passed..."); };

            AsyncTimer timer = new AsyncTimer(countMillisecs, 5, 1000);
            timer.Start();
        }
コード例 #2
0
ファイル: TestTimer.cs プロジェクト: nadiahristova/SoftUni
        static void Main(string[] args)
        {
            Action <int> countMillisecs = (ms) => { Console.WriteLine($"{ms}ms passed..."); };

            AsyncTimer timer = new AsyncTimer(countMillisecs, 5, 1000);

            timer.Start();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: ImarKelam/OOP
        static void Main(string[] args)
        {
            AsyncTimer timer1 = new AsyncTimer(SayHello, 10, 1000);
            timer1.Start();

            AsyncTimer timer2 = new AsyncTimer(PointlessMethod, 5, 2000);
            timer2.Start();
        }
コード例 #4
0
        static void Main(string[] args)
        {
            var timer = new AsyncTimer(() => Console.WriteLine("Halo"), 10, 1000);

            timer.Start();
            while (!timer.IsReady)
            {
            }
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: nok32/SoftUny-HW
        static void Main(string[] args)
        {
            var timer = new AsyncTimer(() => Console.WriteLine("Halo"), 10, 1000);
            timer.Start();
            while (!timer.IsReady)
            {

            }
        }
コード例 #6
0
ファイル: MainClass.cs プロジェクト: AdrianDamyanov/CSharpOOP
 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();
 }
コード例 #7
0
ファイル: AsyncTimerTests.cs プロジェクト: dr3zz/CSharp
        static void Main(string[] args)
        {
            AsyncTimer print = new AsyncTimer(Print, 10, 1000);

            print.Start();
            AsyncTimer beep = new AsyncTimer(BeeP, 10, 500);

            beep.Start();
        }
コード例 #8
0
ファイル: AsyncTimerExec.cs プロジェクト: tormibg/SoftUni-1
 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();
 }
コード例 #9
0
ファイル: TestTimer.cs プロジェクト: dpetrova/OOP
        static void Main()
        {
            AsyncTimer timer1 = new AsyncTimer(method1, 500, 10);

            timer1.Start();

            AsyncTimer timer2 = new AsyncTimer(method2, 1000, 10);

            timer2.Start();
        }
コード例 #10
0
        static void Main(string[] args)
        {
            AsyncTimer timer1 = new AsyncTimer(Work1, 1000, 10);

            timer1.Start();

            AsyncTimer timer2 = new AsyncTimer(Work2, 900, 10);

            timer2.Start();
        }
コード例 #11
0
 public static void Main()
 {
     AsyncTimer timer = new AsyncTimer(Action, 10, 1000);
     timer.Start();
 }