Types and Values
GTimer records a start time, and counts microseconds elapsed since that time. This is done somewhat differently on different platforms, and can be tricky to get exactly right, so GTimer provides a portable/convenient interface.
GTimer * g_timer_new (
Creates a new timer, and starts timing (i.e.
implicitly called for you).
a new GTimer.
void g_timer_start (
Marks a start time, so that future calls to
report the time since
g_timer_start() was called.
automatically marks the start time, so no need to call
g_timer_start() immediately after creating the timer.
void g_timer_stop (
Marks an end time, so calls to
g_timer_elapsed() will return the
difference between this end time and the start time.
void g_timer_continue (
has been started but not stopped, obtains the time since
the timer was started. If
has been stopped, obtains the
elapsed time between the time it was started and the time it was
stopped. The return value is the number of seconds elapsed,
including any fractional part. The
out parameter is
void g_timer_reset (