-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClock.h
49 lines (37 loc) · 896 Bytes
/
Clock.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
//
// Clock.h
// Tech1
//
// Created by Justin Hust on 12/8/13.
// Copyright (c) 2013 __MyCompanyName__. All rights reserved.
//
#ifndef Tech1_Clock_h
#define Tech1_Clock_h
class AbstractClock {
protected:
// DATA
unsigned int _startTicks;
unsigned int _prevTicks;
unsigned int _currTicks;
unsigned int _frameMSecs;
float _frameSecs;
float _secsElapsed;
public:
// CREATORS
AbstractClock(void);
virtual ~AbstractClock(void);
// MANIPULATORS
virtual void tick(void) = 0;
// ACCESSORS
unsigned int getPrevTicks(void) const;
unsigned int getCurrTicks(void) const;
unsigned int getFrameTicks(void) const;
float getFrameSecs(void) const;
float getSecsElapsed(void) const;
};
// ---------------------------------------------------
class SDLClock : public AbstractClock {
public:
void tick(void);
};
#endif