Krig Game Engine
gametimer.h
1 // Description : Class for handling game timing and delay //
4 #ifndef _GAME_TIMER_H_
5 #define _GAME_TIMER_H_
6 
7 #include "constants.h"
8 
9 #ifdef _WIN32
10  #include <windows.h>
11 #endif
12 
13 #define LARGE_INTEGER long
14 #define MAX_FPS 60.0f
15 
16 class GameTimer {
17  public:
18  bool init();
19  float getElapsedSeconds();
20  float getFPS();
21 
22  private:
23  long m_startTime;
24  LARGE_INTEGER m_ticksPerSecond;
25  float fps;
26 };
27 
28 #endif
Definition: gametimer.h:16