unsigned int elapsed = (unsigned int) (clock() / (CLOCKS_PER_SEC / 1000)) - timer->begin; if (elapsed == timer->elapsed + 1000) { timer->elapsed = elapsed; fprintf(debuglog, "[1000] timer->elapsed: %u\n", timer->elapsed); fflush(debuglog); loop_timer(list_win->win_game, timer); loop_obstacles(list_win->win_game, list_bu, list_ob, pl); } if (elapsed == timer->elapsed + 500) { timer->elapsed = elapsed; fprintf(debuglog, "[500] timer->elapsed: %u\n", timer->elapsed); fflush(debuglog); loop_bullets(list_win->win_game, list_bu, list_ob, pl); }