Re: Question about GTK+ and timers
- From: Robert Pearce <rob bdt-home demon co uk>
- To: gtk-list gnome org
- Subject: Re: Question about GTK+ and timers
- Date: Wed, 6 Apr 2011 23:42:23 +0100
Hi Igor,
On Wed, 6 Apr 2011 12:12:56 -0700 you wrote:
> My task is to read the external device thru the serial port with the 1
> sec interval.
> And then update the GUI with the new data.
> At least the documentation of this device says that it will write with 1 sec.
>
> I am testing on x86, then cross-compiling for ARM and run the program on ARM.
>
> Will I be better off with just continuous loop inside thread or the
> timer will do?
If the device does an autonomous report every second, you're probably
better off using a g_io_channel to capture the incoming message and
update the GUI using g_io_add_watch. No need for a timeout.
Cheers,
Rob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]