-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTimer.h
53 lines (33 loc) · 867 Bytes
/
Timer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef TIMER_H
#define TIMER_H
#include "SDL2/SDL.h"
class Timer
{
private:
//if the timer has started
bool started;
//if the timer is paused
bool paused;
//Ticks when the timer began
int startTicks;
//Ticks when the timer was paused
int pausedTicks;
public:
Timer( void );
virtual ~Timer( void );
//Start the timer
void start( void );
//Stop the timer
void stop( void );
//Pause the timer
void pause( void );
//Unpause the timer
void unpause( void );
//get the current ticks
Uint32 getTicks( void );
//Check if the timer is paused
bool isPaused( void );
//Check if the timer has started
bool isStarted( void );
};
#endif // TIMER_H