Re: Timer !



On Tue, 15 Jul 2003 ahmed-1205 zabvision edu pk wrote:

Hi ,

I want this timer functionality in my gtk program, right now what i am
doing is

signal(sigalrm,sigh)
alarm(1);

and in sigh

void sigh(int sig) {
// do my stuff
alarm(1);
}

is this ok  ? or Gtk provides some alternative to this ?

Have you looked into the g_timeout_add() function?
http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html#g-timeout-add

-Seth

-- 
Seth Remington
SaberLogic, LLC
661-B Weber Drive
Wadsworth, Ohio 44281
Phone: (330)335-6442
Fax: (330)336-8559




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