From adbaab7ef998608f19f6740658e4911f1ca16a73 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 1 Nov 2003 21:23:48 +0000 Subject: added doxygen comment svn-id: r11036 --- common/timer.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'common/timer.h') diff --git a/common/timer.h b/common/timer.h index d9ac75ea13..91786aca10 100644 --- a/common/timer.h +++ b/common/timer.h @@ -52,8 +52,24 @@ public: Timer(OSystem *system); ~Timer(); - bool installTimerProc(TimerProc procedure, int32 interval, void *refCon); - void removeTimerProc(TimerProc procedure); + /** + * Install a new timer callback. It will from now be called every interval microseconds. + * The timer may be invoked from a seperate thread. Hence any timer code should be + * written following the same safety guidelines as any other threaded code. + * + * @note Although the interval is specified in microseconds, the actual timer resolution + * may be lower. In particular, with the SDL backend the timer resolution is 10ms. + * @param proc the callback + * @param interval the interval in which the timer shall be invoked (in microseconds) + * @param refCon an arbitrary void pointer; will be passed to the timer callback + * @return true if the timer was installed successfully, false otherwise + */ + bool installTimerProc(TimerProc proc, int32 interval, void *refCon); + + /** + * Remove the given timer callback. It will not be invoked anymore. + */ + void removeTimerProc(TimerProc proc); protected: static int timer_handler(int t); -- cgit v1.2.3