17 lines
502 B
VB.net
Raw Permalink Normal View History

2025-05-12 10:19:36 +09:00
Module Module1
Declare Function GetTickCount Lib "kernel32" Alias "GetTickCount" () As Integer
''Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public Function DelayMs(TimeMs As Long) As Boolean
Dim StartTime As Long
Dim CurrTime As Long
StartTime = GetTickCount
CurrTime = GetTickCount
While (CurrTime - StartTime <= TimeMs)
CurrTime = GetTickCount
End While
Return True
End Function
End Module