High progress timing, accurate to 0.001 seconds, and is not any interference!

zhaozj2021-02-11  185

'Add a Module in Project, then add the following code: Option Explicit

Type Large_integer LowPart As Long Highpart As LONGEND TYPE

Public Declare Function QueryPerformanceCounter Lib "kernel32" _ (lpPerformanceCount As LARGE_INTEGER) As LongPublic Declare Function QueryPerformanceFrequency Lib "kernel32" _ (lpFrequency As LARGE_INTEGER) As LongPublic Declare Function timeSetEvent Lib "winmm.dll" (ByVal uDelay As Long, ByVal _ uResolution As Long, ByVal lpFunction As Long, ByVal dwUser As Long, _ ByVal uFlags As Long) As LongPublic Declare Function timeKillEvent Lib "winmm.dll" (ByVal uID As Long) As LongPublic Declare Function GetTickCount Lib "kernel32" () As Long

Public LMSFREQ As Longpublic Timercount As Singlepublic Lmmcount As SinglePublic LTIMEID AS Longpublic ActTime1 As Longpublic ActTime2 As Longpublic iCountStart As Single

DIM ICOUNT AS SINGLE

转载请注明原文地址:https://www.9cbs.com/read-4858.html

New Post(0)