From 3a2f69b3f1082b2fbdf39bd2a4f7ad0020971eac Mon Sep 17 00:00:00 2001 From: tom Date: Mon, 2 May 2016 15:39:22 -0500 Subject: spring cleaning, added framerate cap & started iterator replacement --- inc/main.hpp | 1 + inc/timer.hpp | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 inc/timer.hpp (limited to 'inc') diff --git a/inc/main.hpp b/inc/main.hpp index c6f51e3..d20f7ef 100644 --- a/inc/main.hpp +++ b/inc/main.hpp @@ -8,5 +8,6 @@ #include "resource.hpp" #include "list.hpp" #include "location.hpp" +#include "timer.hpp" #endif diff --git a/inc/timer.hpp b/inc/timer.hpp new file mode 100644 index 0000000..1213311 --- /dev/null +++ b/inc/timer.hpp @@ -0,0 +1,25 @@ +#ifndef timer_h +#define timer_h + +#include "window.hpp" + +class Timer +{ + public: + Timer(); + void Start(); + void Stop(); + void Pause(); + void unPause(); + int getTicks(); + bool isStarted(){return started;}; + bool isPaused(){return paused;}; + + private: + int startTicks; + int pausedTicks; + bool paused; + bool started; +}; + +#endif -- cgit v1.2.3