Re: Periodic and cross platform timers or alarms



On Wed, Aug 10, 2005 at 01:16:10PM -0500, Douglas Vechinski wrote:
...
> 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.

this registers a callback:

http://www.gtk.org/api/2.6/glib/glib-The-Main-Event-Loop.html#g-timeout-add


and (I think I got the right one here), you can use this function to
stop the timer outside of the timeout callback:

http://www.gtk.org/api/2.6/glib/glib-The-Main-Event-Loop.html#g-source-remove





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