Re: Timers



On Tue, 29 May 2001, Ian Frawley wrote:

Hi

I am trying to develop an application on Linux. This application has a
GUI which I have implemented using GTK written in C++. The problem is
that I have to periodically poll another application so a timer widget
or something would be great but I don't think timers exist. Hopefully
I am wrong and someone could point me in the right direction.

You should *never* need to poll something. When the other application
have information to you it should send it on a file descriptor
(or socket).

You could then decide if you whant that information or disregard it.

In your application you do something like

gdk_input_add( mySocket, GDK_INPUT_READ, GTK_SIGNAL_FUNC(file_function),
&cmdinfo );

where mySocket is the socket (or filedescriptor).

Don't use poll. You don't need it.

Göran Hasse



Any help would be greatly appreciated

Thanks in advance

Ian Frawley
Software Engineer
Opal Telecom
Tel: 0161 222 2122
E-Mail: ifrawley opaltelecom co uk



----------------------------------------------------------------
Göran Hasse            email: gh raditex se     Tel: +46 8 694 92 70
Raditex AB             http://www.raditex.se    Fax: +46 8 442 05 91
Sickla Alle 7, 1tr                              Mob: 070-5530148
131 34  NACKA, SWEDEN






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