treewars/timer.h

24 lines
306 B
C++

/* A wrapper around the SDL_GetTicks() function, to add more
* convenient and intelligent functionality
*/
#ifndef _TIMER_H_
#define _TIMER_H_
#include <SDL.h>
class Timer
{
public:
Timer();
void start();
int get_ticks();
private:
int init_ticks;
int current_ticks;
};
#endif