Use queryperformancecounter, not gettickcount. I'll post the code in a second.
Edit: Here you go...
VB Code:
Private CPUFreq As Currency Public Sub InitTimer() Dim cFreq As Currency Call QueryPerformanceFrequency(cFreq) CPUFreq = CDbl(cFreq) End Sub Public Function HiResTimer() As Double Dim PCounter As Currency Call QueryPerformanceCounter(PCounter) HiResTimer = CDbl(PCounter) / CPUFreq End Function




Reply With Quote