Hi
We're having some timing issues with one of our longer running software
programs.
I am trying to measure how many times my computer can loop through before
one millisecond has passed by and the result is ALWAYS different by a lot.
Almost like it's always a random number.
I'm using VB6.
Dim i As Long
Dim initial_count As Long
i = 0
initial_count = GetTickCount()
Do While GetTickCount() - initial_count < 1
i = i + 1
Loop
MsgBox "The number of loops in 1 millisecond equals " & i
would anyone have any idea why I get a different result everytime?
Thank you in advance
Private Declare Function GetTickCount Lib "kernel32" () As Long