[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] 99 CPU use?
Its a bit crude, but you could try something like this
Freq = 60
time_to_wait = int (1000/Freq)
while 1:
pygame.time.wait(time_to_wait)
Bo)
enrike wrote:
Hi
I am not sure that this has been discussed before. I have been doing
some tests and i realised that when I run any of the apps i am
building on pygame they take 99 of my CPU. Then if I try to run some
other application it takes forever to start up. I noticed this after
realiseing that on a mac G4 laptop every time I run the tests the fan
would start spinning at max speed.
Is there any way to avoid this? I understand that if you are playing a
game you dont probably want to have any other application runnning on
top of the game but if you are using pygame to do something that is
not exactly a game, like I am, it becomes a problem. In my case i need
to have another application "listening" to pygame to produce sound.
this is also a process intense process and pygame takes over the
system in such a way that it becomes impossible even to start up the
sound environment.
thanks!