Timer
Object Hierarchy:
Description:
[ Compact ]
[ CCode ( free_function = "g_timer_destroy" ) ]
public class Timer
`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.
Content:
Creation methods:
Methods:
- public void @continue ()
Resumes a timer that has previously been stopped with
stop.
- public double elapsed (out ulong microseconds = null)
If this has been started but not
stopped, obtains the time since the timer was started.
- public bool is_active ()
Exposes whether the timer is currently active.
- public void reset ()
This function is useless; it's fine to call
start on an already-started timer to reset the start time, so
reset serves no purpose.
- public void start ()
Marks a start time, so that future calls to
elapsed will report the time since start was called.
- public void stop ()
Marks an end time, so calls to
elapsed will return the difference between this end time and the start time.