Skip to content
Snippets Groups Projects
Commit 2394f25d authored by belkhiritaha's avatar belkhiritaha
Browse files

ajout timer

parent 5d0c496f
No related branches found
No related tags found
No related merge requests found
......@@ -315,9 +315,9 @@ void mainLoop(){
while (running){
a = SDL_GetTicks();
delta = (a - b);
timer += delta;
printf("timer : %f\n", timer);
if (delta > 1000/FPS_TO_GET){
timer += delta;
printf("timer : %f\n", timer/1000);
b = a;
printf("fps : %f", 1000/delta);
switch (gameState){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment