Re: Usage of gtk_main_iteration_do ()
- From: Harring Figueiredo <harringf yahoo com>
- To: Russell Shaw <rjshaw iprimus com au>, gtk-app-devel-list gnome org
- Subject: Re: Usage of gtk_main_iteration_do ()
- Date: Sat, 12 Apr 2003 21:33:30 -0700 (PDT)
If you need to do something based on time, why can't you use g_timeout_add ?
--- Russell Shaw <rjshaw iprimus com au> wrote:
Hi,
If i do:
while(!gtk_main_iteration_do(0)){ // non-blocking
a_non_blocking_function();
}
then will this waste lots of cpu cycles?
Should i do:
while(!gtk_main_iteration_do(0)){ // non-blocking
a_non_blocking_function();
usleep(10000);
}
to check everything 100 times a second?
Is there a function to tell the linux scheduler to end the current
time slice? That way i could replace usleep() with a scheduler
yield function.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]