Re: Question about GTK+ and timers

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

 



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
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux