Timing service. Time is measured in ticks. A tick is about 10 msec. More...
#include <gui_tk.h>
Classes | |
| struct | ltuint |
| Compare two integers for 'less-than'. More... | |
Static Public Member Functions | |
| static void | check (Ticks ticks) |
| Advance time and check for expired timers. | |
| static void | check_to (Ticks ticks) |
| static void | add (Timer_Callback *cb, const Ticks ticks) |
Add a timed callback. ticks is a value relative to now(). | |
| static void | remove (const Timer_Callback *const timer) |
| static Ticks | now () |
| Return current time (ticks since application start) | |
| static Ticks | next () |
| Return number of ticks until next scheduled timer or 0 if no timers. | |
Static Protected Attributes | |
| static Ticks | ticks = 0 |
| Number of ticks since application start. | |
|
static std::multimap< Ticks, Timer_Callback *, ltuint > | timers |
| Active timers. | |
Timing service. Time is measured in ticks. A tick is about 10 msec.
Note that this is not suitable as a high-accuracy timing service. Timer events can be off by many ticks, and a tick may be slightly more or slightly less than 10 msec. Because of that, Timers are only intended for simple animation effects, input timeouts and similar things.
| static void GUI::Timer::add | ( | Timer_Callback * | cb, |
| const Ticks | ticks | ||
| ) | [inline, static] |
1.8.0