aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-11-01 21:23:48 +0000
committerMax Horn2003-11-01 21:23:48 +0000
commitadbaab7ef998608f19f6740658e4911f1ca16a73 (patch)
treecb09b768b006bd779154482fc696227be6487c17
parent561d4c09d89986f010090c1893168611ba0774cf (diff)
downloadscummvm-rg350-adbaab7ef998608f19f6740658e4911f1ca16a73.tar.gz
scummvm-rg350-adbaab7ef998608f19f6740658e4911f1ca16a73.tar.bz2
scummvm-rg350-adbaab7ef998608f19f6740658e4911f1ca16a73.zip
added doxygen comment
svn-id: r11036
-rw-r--r--common/timer.h20
1 files changed, 18 insertions, 2 deletions
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);