2009/3/10 Adeel Malik <adeelmali...@yahoo.com>:
> I intend to monitor the variable's value (acquired via data acquisition 
> hardware) at a rate of around 1,000 times per second.
> I haven't used textboxes before in GTK+. Could anyone suggest how to update 
> the value of a variable in a textbox etc., at this rate.

You'll burn up all of your CPU and you probably still won't reach
1,000 updates a second. No one can read numbers that quickly, and your
display will only update at (maybe) 60 frames a second anyway.

I would suggest updating at 10 frames per second (quite fast enough
for any human) and showing the average of the last 100 measurements.
You could add a second and third label showing the minimum and maximum
values in the last 5 seconds if you're keen not to miss any peaks.

I would have a background thread to do the data capture and analysis,
then have this thread signal the GUI to update 10 times a second.

For example:

http://www.mail-archive.com/gtk-app-devel-list@gnome.org/msg09058.html

John
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to