[Tuxnes-devel] How to pause with minimal effect on seti or distributed.net?
Brought to you by:
tmmm
From: Mike M. <che...@ya...> - 2004-07-29 00:47:03
|
After looking into this I wonder how the current pause code may even work at all, it's if'ed out in places. As for select vs useep this is imposible as we need to call XPending to get events and it's vary unlikely we will receve any signals(interupts) since among other things we don't have any children. I'm going to run some ddd/gdb tests. --- Jason Dorje Short <jd...@us...> wrote: > Mike Mestnik wrote: > > That's correct, I just used usleep for finding when the event might > end. > > This way where not constintaly looking for the event, just once every > time > > frame. > > > > While forward porting this too CVS HEAD I saw that non of the working > > renderes still had this code. This could be the clue I needed to get > GGI > > working, since it still has this code. > > Well, you could replace it with a select(NULL, NULL, NULL, &tv), where > tv holds the polling time. The poll time doesn't have to correspond to > a frame, though. Using select _might_ give better results (lower lag) > since it will exit if there's an interrupt. But in most cases it > probably doesn't matter. > > Looking at the internals of a function like gtk_main() may show a better > > way to do this. Most GUI libraries have code like this already. > > jason > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > Tuxnes-devel mailing list > Tux...@li... > https://lists.sourceforge.net/lists/listinfo/tuxnes-devel > __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail |