コード例 #1
0
        static void Main(string[] args)
        {
            AsynchronousTimer printLetter = new AsynchronousTimer(PrintLetterOnConsole, 5, 500);
            printLetter.Execute();

            AsynchronousTimer printNumber = new AsynchronousTimer(PrintNumberOnConsole, 3, 1000);
            printNumber.Execute();
        }
コード例 #2
0
        public static void Main(string[] args)
        {
            Action<object, EventArgs> getTime = GetTime;

            var timer = new AsynchronousTimer(getTime, 10, 1000);
            timer.OnRun += GetTime;
            timer.Run();
        }
コード例 #3
0
 public static void Main(string[] args)
 {
     Action<int, int> action = OnTick;
     AsynchronousTimer aSyncTimer = new AsynchronousTimer(5, action, 1000);
 }
コード例 #4
0
 static void Main()
 {
     AsynchronousTimer asynchronousTimer = new AsynchronousTimer(PrintDateTimeMilliseconds, 10, 1000);
     asynchronousTimer.Run();
 }
コード例 #5
0
        static void Main()
        {
            AsynchronousTimer asyncTimer = new AsynchronousTimer(DoSomething, 15, 1000);

            asyncTimer.StartAsync();
        }