如果我叫开始()在类System.Windows.Forms.Timer两次会发生什么? [英] What happens if I call Start() two times on class System.Windows.Forms.Timer?
本文介绍了如果我叫开始()在类System.Windows.Forms.Timer两次会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
想象一下,我有一个 System.Windows.Forms.Timer
与1000毫秒的时间间隔。
Imagine that I have a System.Windows.Forms.Timer
with 1000 ms interval.
如果我称之为 Timer.Start()
方法和后500毫秒我再次呼吁 Timer.Start()
怎么了?第二个启动
通话将重置间隔或不?有没有副作用?
If I call Timer.Start()
method and after 500 ms I call again Timer.Start()
what happens? The second Start
call will reset the interval or not? Are there any side effects?
推荐答案
定时器已经启动,所以第二个电话会不会影响它。
The timer is already started, so a second call will not affect it.
无论如何,这是轻松以测试。
Regardless, this is easy to test.
这篇关于如果我叫开始()在类System.Windows.Forms.Timer两次会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文