From a8bcacc95045102e67f2feabbdddf79535837554 Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Thu, 19 Aug 2021 18:46:51 +0200 Subject: forgot to make repo until now --- timing/timing.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 timing/timing.h (limited to 'timing/timing.h') diff --git a/timing/timing.h b/timing/timing.h new file mode 100644 index 0000000..f420582 --- /dev/null +++ b/timing/timing.h @@ -0,0 +1,24 @@ +#ifndef TIMING_H +#define TIMING_H + +#define SDL_MAIN_HANDLED +#include + +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 \ No newline at end of file -- cgit v1.2.3-54-g00ecf