VB如何精确定时
如题,谢谢!
我一般是用如下函数控制延时时间
Private Declare Function timeGetTime Lib "winmm.dll" () As Long '取得流逝时间
sleep(1000)'就是1秒
Private Sub sleep(seconds As Integer)
Dim temp As Variant
temp = timeGetTime
While timeGetTime - seconds < temp
DoEvents
Wend
End Sub