Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
using System.Timers; var timer = new Timer(); timer.Interval = 1000; timer.Start(); // Wait for 500 timer.Stop(); timer.Start();
我的间隔将有 500 个或 1000 个?
简短的问题,简短的回答。您的计时器将在停止后以 1000 毫秒的新间隔开始。另见MSDN:System.Timers.Timer.Stop()
System.Timers.Timer.Stop()