Re: Keeping program flow moving nicely
- From: "Timothy M. Shead" <tshead k-3d com>
- To: "Eric M. Monsler" <emonsler beamreachnetworks com>
- Cc: Dave Neary <dneary eircom net>, gtk-list gnome org
- Subject: Re: Keeping program flow moving nicely
- Date: Sat, 10 Feb 2001 18:17:45 -0800
Eric M. Monsler wrote:
"Timothy M. Shead" wrote:
(snip)
Use gtk_timeout_add() to create a 'timeout' signal that gets called,
say, every 100 milliseconds or so. In your handler for the timeout
event you decide whose turn it is and call process_move().
What is the gtk behavior in this situation, if it takes more than 100 ms
to do process_move()? I have no idea if this game does so, but I'm
curious what would happen.
I don't recall what GTK+'s behaviour is in this situation. My project
is a 3D graphics app where screen refreshes can easily exceed the
timeout, so it's a good issue to bring up ... I forgot to mention that I
only use every other timeout signal for drawing - leaving a "catchup"
timeout between screen refreshes guarantees that GTK+ will have a chance
to process other events.
Cheers,
Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]