I have a thread which I would like to run in an Infinite Loop, but I
want to use it more like a Timer. The reason why I am not using a
time is because this thread will be used to update the GUI and I
don't want actions such as accessing Menu and MouseDown events to
interrupt the drawing.
So what I am using is the Thread.Sleep() method with the code below:
While True
// do my thing
Me.Sleep(40) // refresh for every 1/25 of a second
Wend
But I have SERIOUS issue: no matter the Sleep() value, the CPU is
always pegged at 100%, making my PowerBook very hot to the touch.
This includes values such as 10,000 which is the equivalent to once
every 10 seconds.
Is the Sleep() method seriously screwed up, or am I using it
incorrectly?
REALbasic 2006r3
PEF running in Debugger
OS X 10.4.7
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>