[Scummvm-cvs-logs] CVS: scummvm/common timer.h,1.12,1.13
Max Horn
fingolfin at users.sourceforge.net
Sat Nov 1 13:24:11 CET 2003
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv29234
Modified Files:
timer.h
Log Message:
added doxygen comment
Index: timer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/timer.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- timer.h 17 Oct 2003 16:39:31 -0000 1.12
+++ timer.h 1 Nov 2003 21:23:48 -0000 1.13
@@ -52,8 +52,24 @@
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);
More information about the Scummvm-git-logs
mailing list