[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Figuring out idle time



On Fri, Sep 20, 2002 at 04:57:43PM -0400, Jesse David Andrews wrote:
> Every time you have input, update a variable with the current "time" (in SDL this is the number of ms since the game started).  
> 
> Then in your main loop, see if the current "time" - last input time >= 1000*# of seconds to wait.

Sure that's what I'll do in the event I can't reset the timer to 0 (from
looking at pygame.time it seems I can't do that in the first place).
The problem I'm having pertains to the fact that once I'm in the main
application loop and hit the "event = pygame.event.wait()" line, the
only chance I have to check the idle time is once an event happens
defeating the point of trying to do something different after X amount
of idle time. :)  I guess the problem is because I am using the event
queue in the first place, but my app needs to do it that way so I may be
out of luck.  I still think I'm probably overlooking the obvious solution.
Thanks for the tip thought.  Take Care

Robert
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org