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.
我希望根据秒表值设置我的计时器间隔。秒表计算函数的执行时间,这个执行时间应该用于我的计时器间隔。
Timer t = new Timer(timercallbackfunc, null, 0, elapsedtime);
请提供一些代码示例。
你的意思是这样的吗?
Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); ... Timer t = new Timer(timercallbackfunc, null, 0, stopwatch.ElapsedMilliseconds);