Re: keeping track of time.
- From: Tristan Van Berkom <tvb gnome org>
- To: John Vetterli <jvetterli linux ca>
- Cc: Gtk AppDev Mailing List <gtk-app-devel-list gnome org>
- Subject: Re: keeping track of time.
- Date: Tue, 20 Sep 2005 12:55:02 -0400
John Vetterli wrote:
[...]
Use g_timeout_add to execute a callback function periodically.
http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html
The interval may not be terribly accurate, but if I understand your
needs, this is not important. The callbacks would only cause the widget
to be updated, not for calculating the time elapsed. The time elapsed
can always be calculated by comparing the current system time and the
start time (see "man 2 time").
Just incase you've missed it, you can also use GTimer to calculate
elapsed time.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]