aboutsummaryrefslogtreecommitdiffstats
path: root/code/SDL12/include/SDL_timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'code/SDL12/include/SDL_timer.h')
-rw-r--r--code/SDL12/include/SDL_timer.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/code/SDL12/include/SDL_timer.h b/code/SDL12/include/SDL_timer.h
index d21159f..d7cd024 100644
--- a/code/SDL12/include/SDL_timer.h
+++ b/code/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
}