What I usally do is if there is some while loop in there that is mainly for graphical purposes or somthing to just wait on an event, i throw a little 30ms wait time in there, usally helps quite a bt or else the cpu will run at full speed, and easily eat up 100% of an application.
