'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