spacebox/src/Timer.hpp

23 lines
299 B
C++

#ifndef Timer_h_
#define Timer_h_
#include "SDL.h"
struct Timer
{
int ticks, ticks_previous, frame_duration = 0, elapsed = 0;
bool is_timing = true;
Timer();
void toggle();
void toggle(bool);
void reset();
float get_seconds_elapsed();
void update();
};
#endif