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.
我需要计数毫秒的计时器 - 说明: 格式:“hh\:mm\:ss\,fff”
If MilliTimer.ForMilliseconds = "00:00:01,447" Then Label1.text = "Test" End If
(代码仅供说明)
很难说出您要的是什么,但是如果您想测试自启动“计时器”以来已经发生了多少毫秒,您需要 StopWatch 类。您可以像这样启动秒表:
StopWatch sw = new stopWatch(); sw.Start();
然后你可以像这样测试已经发生了多少毫秒:
if (sw.ElapsedMilliseconds > 1447)