C++ Game Framework  2013-06-04
CGF is a DirectX 11 game framework, built in C++ and DirectX 11. This is used to contain many to the DirectX functionality and wrap them into a framework to make game development easier.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GameTime.h
Go to the documentation of this file.
1 // Filename: GameTime.h
4 
5 //Preprocessor directive designed to cause the current source file to be included only once in a single compilation
6 #pragma once
7 
8 //Includes
9 #include <Windows.h>
10 #include "CGFInclude.h"
11 #include <MMSystem.h>
12 
13 namespace CGF
14 {
15  enum TimeType
16  {
19  };
20 
22  {
23  friend class GameEngine;
24 
25  public:
26  unsigned int GetElapsedTime();
27  unsigned int GetElapsedTime(TimeType type);
28  unsigned int GetTotalTime();
29  unsigned int GetTotalTime(TimeType type);
30 
31  private:
32  GameTime();
33  ~GameTime();
34 
35  bool Start();
36  bool Update();
37 
38  private:
39  DWORD m_baseTime;
41  unsigned int m_totalTime;
42  unsigned int m_elapsedTime;
43  };
44 }