Thursday, November 29, 2018

.NET 冷知识之 System.Timers.Timer

对于定时器 System.Timers.Timer
启动后,即使定时器处于如下状态:
Timer.AutoReset = false;
Timer.Enabled = false;
改变 Timer.Interval 仍会引起定时器重新启动计时

参考:
https://social.msdn.microsoft.com/Forums/en-US/6b2181e0-94c5-499f-a9ae-cbabd4d016da/changing-interval-of-timer-while-enabled?forum=csharpgeneral
https://stackoverflow.com/questions/5478442/system-timers-timer-interval-resetting-causing-restart

No comments:

Post a Comment

一些有用的网站

Windows系统安装界面认不到硬盘,加载RST驱动: https://iknow.lenovo.com.cn/detail/419926.html 纯净版Flash: https://gitlab.com/cleanflash/installer/-/releases    ...