include/SDL_timer.h
changeset 7191 75360622e65f
parent 6885 700f1b25f77f
child 7857 6388f5229bb7
equal deleted inserted replaced
7190:11612d544fcd 7191:75360622e65f
    22 #ifndef _SDL_timer_h
    22 #ifndef _SDL_timer_h
    23 #define _SDL_timer_h
    23 #define _SDL_timer_h
    24 
    24 
    25 /**
    25 /**
    26  *  \file SDL_timer.h
    26  *  \file SDL_timer.h
    27  *  
    27  *
    28  *  Header for the SDL time management routines.
    28  *  Header for the SDL time management routines.
    29  */
    29  */
    30 
    30 
    31 #include "SDL_stdinc.h"
    31 #include "SDL_stdinc.h"
    32 #include "SDL_error.h"
    32 #include "SDL_error.h"
    33 
    33 
    34 #include "begin_code.h"
    34 #include "begin_code.h"
    35 /* Set up for C function definitions, even when using C++ */
    35 /* Set up for C function definitions, even when using C++ */
    36 #ifdef __cplusplus
    36 #ifdef __cplusplus
    37 /* *INDENT-OFF* */
       
    38 extern "C" {
    37 extern "C" {
    39 /* *INDENT-ON* */
       
    40 #endif
    38 #endif
    41 
    39 
    42 /**
    40 /**
    43  * \brief Get the number of milliseconds since the SDL library initialization.
    41  * \brief Get the number of milliseconds since the SDL library initialization.
    44  *  
    42  *
    45  * \note This value wraps if the program runs for more than ~49 days.
    43  * \note This value wraps if the program runs for more than ~49 days.
    46  */
    44  */
    47 extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
    45 extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
    48 
    46 
    49 /**
    47 /**
    61  */
    59  */
    62 extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
    60 extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
    63 
    61 
    64 /**
    62 /**
    65  *  Function prototype for the timer callback function.
    63  *  Function prototype for the timer callback function.
    66  *  
    64  *
    67  *  The callback function is passed the current timer interval and returns
    65  *  The callback function is passed the current timer interval and returns
    68  *  the next timer interval.  If the returned value is the same as the one
    66  *  the next timer interval.  If the returned value is the same as the one
    69  *  passed in, the periodic alarm continues, otherwise a new alarm is
    67  *  passed in, the periodic alarm continues, otherwise a new alarm is
    70  *  scheduled.  If the callback returns 0, the periodic alarm is cancelled.
    68  *  scheduled.  If the callback returns 0, the periodic alarm is cancelled.
    71  */
    69  */
    95 extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id);
    93 extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id);
    96 
    94 
    97 
    95 
    98 /* Ends C function definitions when using C++ */
    96 /* Ends C function definitions when using C++ */
    99 #ifdef __cplusplus
    97 #ifdef __cplusplus
   100 /* *INDENT-OFF* */
       
   101 }
    98 }
   102 /* *INDENT-ON* */
       
   103 #endif
    99 #endif
   104 #include "close_code.h"
   100 #include "close_code.h"
   105 
   101 
   106 #endif /* _SDL_timer_h */
   102 #endif /* _SDL_timer_h */
   107 
   103