blob: f420582fca7bd9fd53468014fa28f7b0ade4ff35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef TIMING_H
#define TIMING_H
#define SDL_MAIN_HANDLED
#include <SDL2/SDL.h>
class timing_sdl {
public:
timing_sdl(double fps);
void process();
bool check_process();
bool check_render();
private:
double frame_time;
double last_time;
double frame_counter;
double tot_time;
double unprocessed_time;
int frames;
bool render;
};
#endif
|