About gtk_timeout_add



Hi, All
 
   i want to write an animation program with maximum frame rate 30. So i use
gtk_timeout_add(1000/30, (GtkFunction)animate, 0) to call animation function every 1/30 second. But the animation function is called only about 17 times/second. For testing purpose, the animation function looks like the following
static gint animate() {
cnt++;
return 1;
}
As i know, setitimer is very accurate.
Are there any other functions can be used to achieve an accurate timeout?
Thanks
 
Paul Lin


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