GEJM  1.0.0.0
a 2D platformer made by students
Timer.h
1 #ifndef TIMER_H
2 #define TIMER_H
3 
4 #include <SDL.h>
5 
9 class Timer
10 {
11 public:
15  Timer();
16 
17  //The various clock actions
18 
22  void start();
23 
27  void stop();
28 
32  void pause();
33 
37  void unpause();
38 
43  Uint32 getTicks();
44 
49  bool isStarted();
50 
55  bool isPaused();
56 
57 private:
61  Uint32 startTicks;
62 
66  Uint32 pausedTicks;
67 
71  bool paused;
72 
76  bool started;
77 };
78 
79 #endif // TIMER_H
Timer()
Definition: Timer.cpp:10
Definition: Timer.h:9
void stop()
Definition: Timer.cpp:37
void start()
Definition: Timer.cpp:21
void pause()
Definition: Timer.cpp:53
void unpause()
Definition: Timer.cpp:70
bool isPaused()
Definition: Timer.cpp:128
Uint32 getTicks()
Definition: Timer.cpp:90
bool isStarted()
Definition: Timer.cpp:118