22 #define DEFAULT_RESOLUTION 1 41 main(
int argc,
char *argv[])
59 desired = atoi(argv[1]);
67 SDL_Log(
"Waiting 10 seconds\n");
75 SDL_Log(
"Timer resolution: desired = %d ms, actual = %f ms\n",
76 desired, (
double) (10 * 1000) /
ticks);
80 SDL_Log(
"Testing multiple timers...\n");
92 SDL_Log(
"Waiting 10 seconds\n");
95 SDL_Log(
"Removing timer 1 and waiting 5 more seconds\n");
104 for (i = 0; i < 1000000; ++
i) {
int main(int argc, char *argv[])
Uint64 SDL_GetPerformanceFrequency(void)
Get the count per second of the high resolution counter.
#define DEFAULT_RESOLUTION
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
Uint32 SDL_GetTicks(void)
Get the number of milliseconds since the SDL library initialization.
static Uint32 ticktock(Uint32 interval, void *param)
static Uint32 callback(Uint32 interval, void *param)
#define SDL_GetPerformanceCounter
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
#define SDL_LogSetPriority