该定时器类的实例能够被多个线程安全地访问。
Instances of this timer class can be safely accessed from multiple threads.
我愿意说这是所有定时器类中最好的一个,但这会引起误导。
I'd like to say that this is the best of all timer classes, but that would be misleading.
这个应用程序将会让你获得对这几个定时器类的清晰的理解。
This application will help you gain a clear understanding of each of the timer classes.
这个定时器类引发的定时器事件是同你的窗口应用程序的其余代码相同步的。
The timer events raised by this timer class are synchronous with respect to the rest of the code in your Windows Forms app.
为了快速方便的看到。NET框架中这三个定时器类的不同之处,见Figure7对三个类的比较。
For a quick recap of my look at the three timer classes available in the.net Framework, see the table in Figure 7 which compares these three classes.
这意味着正在执行的代码从来不会被这个定时器类的实例所抢占(假设你不调用Application . DoEvents)。
This means that application code that is executing will never be preempted by an instance of this timer class (assuming you don't call Application.DoEvents).
不像我开始描述的两个定时器类,System . Threading . Timer有四个重载构造函数,就像下面这样。
Unlike the previous two timer classes that I have just covered, System.Threading.Timer has four overloaded constructors. The following shows what they look like.
就像一个典型窗体程序里的其它代码一样,任何驻留在一个定时器事件处理函数(指的是该类型的定时器类)中的代码也是使用应用程序的UI线程所执行。
Just like the rest of the code in a typical Windows Forms application, any code that resides inside a timer event handler (for this type of timer class) is executed using the application's UI thread.
如果为了处理由该定时器类产生的定时器事件而在你的代码中有一个Application .DoEvents的调用,你的程序流程可能会被打断。
If Application.DoEvents is called from your code, your program flow may be interrupted in order to process the timer events generated by an instance of this class.
在组件页上的定时器控件可以被安全的用在任何类中。
The timer control that is located on the Components TAB can be safely used in any class.
当应用程序启动时,TicTacToeActivity类对定时器进行初始化。
The timer is initialized by the TicTacToeActivity class when the application starts up.
AnimationManager类控制定时器并向其Animation对象列表中的第一项发送动画消息。
The AnimationManager class controls the timer and sends animate messages out to the first item in its list of Animation objects.
NET框架文档指出System. Timers .Timer类是一个服务器定时器,是为多线程环境进行设计和优化。
The.net Framework documentation refers to the System.Timers.Timer class as a server-based timer that was designed and optimized for use in multithreaded environments.
NET框架文档指出System. Timers .Timer类是一个服务器定时器,是为多线程环境进行设计和优化。
The.net Framework documentation refers to the System.Timers.Timer class as a server-based timer that was designed and optimized for use in multithreaded environments.
应用推荐