summaryrefslogtreecommitdiff
path: root/src/SDL12/include/SDL_timer.h
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-10-26 00:10:07 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:17:05 +0000
commit0fed3b1c32d99560482ea162b197531439df76e5 (patch)
treedd5f74d3124715a538462aa474f9af294f79bbbd /src/SDL12/include/SDL_timer.h
parentaf6fd4fa5aaa4dc7c59ae54ead20d5ef0fbcc946 (diff)
* Merge ioq3-r1708
Diffstat (limited to 'src/SDL12/include/SDL_timer.h')
-rw-r--r--src/SDL12/include/SDL_timer.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/src/SDL12/include/SDL_timer.h b/src/SDL12/include/SDL_timer.h
index d21159fe..d7cd0246 100644
--- a/src/SDL12/include/SDL_timer.h
+++ b/src/SDL12/include/SDL_timer.h
@@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2006 Sam Lantinga
+ Copyright (C) 1997-2009 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -23,7 +23,9 @@
#ifndef _SDL_timer_h
#define _SDL_timer_h
-/* Header for the SDL time management routines */
+/** @file SDL_timer.h
+ * Header for the SDL time management routines
+ */
#include "SDL_stdinc.h"
#include "SDL_error.h"
@@ -34,24 +36,26 @@
extern "C" {
#endif
-/* This is the OS scheduler timeslice, in milliseconds */
+/** This is the OS scheduler timeslice, in milliseconds */
#define SDL_TIMESLICE 10
-/* This is the maximum resolution of the SDL timer on all platforms */
-#define TIMER_RESOLUTION 10 /* Experimentally determined */
+/** This is the maximum resolution of the SDL timer on all platforms */
+#define TIMER_RESOLUTION 10 /**< Experimentally determined */
-/* Get the number of milliseconds since the SDL library initialization.
+/**
+ * Get the number of milliseconds since the SDL library initialization.
* Note that this value wraps if the program runs for more than ~49 days.
*/
extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
-/* Wait a specified number of milliseconds before returning */
+/** Wait a specified number of milliseconds before returning */
extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
-/* Function prototype for the timer callback function */
+/** Function prototype for the timer callback function */
typedef Uint32 (SDLCALL *SDL_TimerCallback)(Uint32 interval);
-/* Set a callback to run after the specified number of milliseconds has
+/**
+ * Set a callback to run after the specified number of milliseconds has
* elapsed. The callback function is passed the current timer interval
* and returns the next timer interval. If the returned value is the
* same as the one passed in, the periodic alarm continues, otherwise a
@@ -68,7 +72,7 @@ typedef Uint32 (SDLCALL *SDL_TimerCallback)(Uint32 interval);
* later on an unloaded system. If you wanted to set a flag signaling
* a frame update at 30 frames per second (every 33 ms), you might set a
* timer for 30 ms:
- * SDL_SetTimer((33/10)*10, flag_update);
+ * @code SDL_SetTimer((33/10)*10, flag_update); @endcode
*
* If you use this function, you need to pass SDL_INIT_TIMER to SDL_Init().
*
@@ -81,11 +85,14 @@ typedef Uint32 (SDLCALL *SDL_TimerCallback)(Uint32 interval);
*/
extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback);
-/* New timer API, supports multiple timers
+/** @name New timer API
+ * New timer API, supports multiple timers
* Written by Stephane Peter <megastep@lokigames.com>
*/
+/*@{*/
-/* Function prototype for the new timer callback function.
+/**
+ * Function prototype for the new timer callback function.
* The callback function is passed the current timer interval and returns
* the next timer interval. If the returned value is the same as the one
* passed in, the periodic alarm continues, otherwise a new alarm is
@@ -93,19 +100,22 @@ extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval, SDL_TimerCallback call
*/
typedef Uint32 (SDLCALL *SDL_NewTimerCallback)(Uint32 interval, void *param);
-/* Definition of the timer ID type */
+/** Definition of the timer ID type */
typedef struct _SDL_TimerID *SDL_TimerID;
-/* Add a new timer to the pool of timers already running.
- Returns a timer ID, or NULL when an error occurs.
+/** Add a new timer to the pool of timers already running.
+ * Returns a timer ID, or NULL when an error occurs.
*/
extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, SDL_NewTimerCallback callback, void *param);
-/* Remove one of the multiple timers knowing its ID.
+/**
+ * Remove one of the multiple timers knowing its ID.
* Returns a boolean value indicating success.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID t);
+/*@}*/
+
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}