> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of techtonik > Sent: Thursday, July 31, 2008 4:09 AM > To: pygame-users@seul.org > Subject: Re: [pygame] 100% CPU FAQ > > On Thu, Jul 31, 2008 at 11:31 AM, Noah Kantrowitz <[EMAIL PROTECTED]> > wrote: > > >> > >> The following example shows 100% load even with empty event queue > when > >> pygame.event.get() is blocking. > > > > That would be because event.get() doesn't block. If you want to > control your > > framerate (and therefore CPU usage) use pygame.time.Clock. > > > > If it doesn't block when why print time is executed only when I pass > mouse over the window?
In your original sample you had the main body of the game code indented inside the event for loop. I had assumed it was a paste error, but from what you said, maybe it wasn't. --Noah