zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SDL_systimer.c File Reference
#include "SDL_thread.h"
#include "SDL_timer.h"
#include "SDL_error.h"
#include "../SDL_timer_c.h"
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <pspthreadman.h>

Go to the source code of this file.

Functions

void SDL_Delay (Uint32 ms)
 Wait a specified number of milliseconds before returning. More...
 
Uint64 SDL_GetPerformanceCounter (void)
 Get the current value of the high resolution counter. More...
 
Uint64 SDL_GetPerformanceFrequency (void)
 Get the count per second of the high resolution counter. More...
 
Uint32 SDL_GetTicks (void)
 Get the number of milliseconds since the SDL library initialization. More...
 
void SDL_InitTicks (void)
 

Variables

static struct timeval start
 
static SDL_bool ticks_started = SDL_FALSE
 

Function Documentation

Uint64 SDL_GetPerformanceCounter ( void  )

Get the current value of the high resolution counter.

Definition at line 59 of file SDL_systimer.c.

References SDL_GetTicks().

Uint64 SDL_GetPerformanceFrequency ( void  )

Get the count per second of the high resolution counter.

Definition at line 65 of file SDL_systimer.c.

Uint32 SDL_GetTicks ( void  )

Get the number of milliseconds since the SDL library initialization.

Note
This value wraps if the program runs for more than ~49 days.

Definition at line 44 of file SDL_systimer.c.

References NULL, SDL_InitTicks(), and ticks_started.

Referenced by SDL_AddTimer(), SDL_GetPerformanceCounter(), SDL_PushEvent(), SDL_SemWaitTimeout(), SDL_TimerThread(), and SDL_WaitEventTimeout().

void SDL_InitTicks ( void  )

Definition at line 34 of file SDL_systimer.c.

References NULL, SDL_TRUE, and ticks_started.

Referenced by SDL_GetTicks(), SDL_InitSubSystem(), and SDL_VideoInit().

Variable Documentation

struct timeval start
static

Definition at line 31 of file SDL_systimer.c.

SDL_bool ticks_started = SDL_FALSE
static

Definition at line 32 of file SDL_systimer.c.

Referenced by SDL_GetTicks(), and SDL_InitTicks().