zoukankan      html  css  js  c++  java
  • 计时器的使用

     1 // Summary:
     2 //     A timer that is integrated into the System.Windows.Threading.Dispatcher queue
     3 //     which is processed at a specified interval of time and at a specified priority.
     4 DispatcherTimer timer = new DispatcherTimer();
     5 // Summary:
     6 //     Occurs when the timer interval has elapsed.
     7 timer.Tick += (sender, e) => { System.Console.WriteLine("SubmarineX"); };
     8 // Summary:
     9 //     Gets or sets the period of time between timer ticks.
    10 //
    11 // Returns:
    12 //     The period of time between ticks. The default is 00:00:00.
    13 //
    14 // Exceptions:
    15 //   System.ArgumentOutOfRangeException:
    16 //     interval is less than 0 or greater than System.Int32.MaxValue milliseconds.
    17 timer.Interval = new System.TimeSpan(0, 0, 1);
    18 // Summary:
    19 //     Starts the System.Windows.Threading.DispatcherTimer.
    20 timer.Start();

  • 相关阅读:
    适者生存还是强者生存
    写给十岁的清为
    毕业后的十年
    Python3 字符编码
    线段树模板
    F
    E
    D
    C
    B
  • 原文地址:https://www.cnblogs.com/submarinex/p/3305403.html
Copyright © 2011-2022 走看看