mirror of https://github.com/encounter/SDL.git
testtimer: Be more like the C90's.
This commit is contained in:
parent
4ab7ee1925
commit
e2ba84a532
|
@ -60,12 +60,10 @@ main(int argc, char *argv[])
|
||||||
start64 = SDL_GetTicks64();
|
start64 = SDL_GetTicks64();
|
||||||
start32 = SDL_GetTicks();
|
start32 = SDL_GetTicks();
|
||||||
SDL_Delay(1);
|
SDL_Delay(1);
|
||||||
now64 = SDL_GetTicks64();
|
now64 = SDL_GetTicks64() - start64;
|
||||||
now32 = SDL_GetTicks();
|
now32 = SDL_GetTicks() - start32;
|
||||||
Uint32 dt32 = now32-start32;
|
if (now32 > 100 || now64 > 100) {
|
||||||
Uint64 dt64 = now64-start64;
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "testtimer.c: Delta time erratic at iter %d. Delay 1ms = %d ms in ticks, %d ms in ticks64\n", i, (int)now32, (int)now64);
|
||||||
if (dt32 > 100 || dt64 > 100) {
|
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "testtimer.c: Delta time erratic at iter %d. Delay 1ms = %d ms in ticks, %d ms in ticks64\n", i, (int)dt32, (int)dt64);
|
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue