Re: jiffies gtk_main_iteration
- From: Joël Krähemann <weedlight gmail com>
- To: Emmanuele Bassi <ebassi gmail com>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: jiffies gtk_main_iteration
- Date: Mon, 09 Sep 2013 00:36:41 +0000
Hi
thank you for your response and interest. Time measurements are done
with jiffies as unit on GNU/Linux. This depends on timer frequency from
100 up to 1000 Hz.
I'd really like to know how much computing time does gtk+ need to do its
job.
I have something like the following and want to know how to initialize
frequency:
struct _AgsGuiThread
{
AgsThread thread;
gdouble frequency;
gdouble iter;
};
/* */
for(i = 0; i < i_stop; i++){
gtk_main_iteration();
nanosleep(&wait, NULL);
}
/* */
if(gui_thread->iter > gui_thread->frequency){
gtk_main_iteration();
gui_thread->iter = 0.0;
}else{
gui_thread->iter += (gdouble) floor(1.0 / gui_thread->frequency);
}
please take a look at:
https://sourceforge.net/p/ags/wiki/threads/
https://sourceforge.net/p/ags/code/1036/tree/src/ags/thread/ags_gui_thread.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]