Periodic and cross platform timers or alarms
- From: Douglas Vechinski <douglas vechinski dynetics com>
- To: gtk-list gnome org, gtk-app-dev-list gnome org
- Cc:
- Subject: Periodic and cross platform timers or alarms
- Date: Wed, 10 Aug 2005 13:16:10 -0500
I have a GTK program in which I would like to periodically have a
function called (say every 1-5 sec) to perform a check on something and
take a certain action depending upon the result. Usually the action
will be to do nothing and return. I had first tried using a
gtk_idle_add but this calls it very frequently and eats a lot of cpu
time checking my "something" and sees that it hasn't changed so it
returns and does nothing only to be called practically right a way again
if the user isn't interacting with the interface.
Does GTK+ or GLIB provide any type of repeating timers or alarms? I'm
looking for a portable way (Linux and XP). Unix has "alarm" and XP has
other timers I believe but was looking for something that might be
common to both.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]