During the wait period, the processor time spent by PG goes to 100%.
I don't know what language you're using to build the program, but if you can access the windows API, I sugest you use the SLEEP method.
OS: Windows XP
We're using an algorithm like this:
StartTime = GetSystemTime
DO
DoEvents
WHILE GetSystemTime < StartTime+Delay
The 100% CPU usage is a VB DoEvents bug.
I will pass your suggestion on though.
Thanks,
Wilson.
No Wilson, that's not a VB Bug, that's a programming error.
http://support.microsoft.com/support/kb/articles/Q158/1/75.asp
Since VB doesn't "easily" allows Multithreading you could create a timer and put that code there.
Sub Timer_Elapsed(..)
If( GetSystemTime > StartTime+Delay ) Then
'Were DONE, let's start again.
End if
End Sub
I'll pass it on to the developer.
I'll be glad if you're right :)
Thanks,
Wilson.
Quote from: jcarreiro on February 27, 2004, 11:57:02 AM
I don't know what language you're using to build the program, but if you can access the windows API, I sugest you use the SLEEP method.
OS: Windows XP
Sleep function can't be used in this case because user interface will be frozen by this API call.
I know that, that's why I sugested the Timer Event after Wilson told me he was using VB6.