如何使用 TimeSpan
的值作为 Timer
的间隔?
最佳答案
获取total milliseconds from the TimeSpan
在 the constructor for Timer
中使用:
var timer = new Timer(someTimeSpanObject.TotalMilliseconds);
关于c# - 使用 TimeSpan 作为定时器间隔,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17123265/