Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Frm_Timer.h
Go to the documentation of this file.
1 // Frm_Timer
3 // The timer is responsible for calculating the elapsed
4 // time.
6 
7 #ifndef FRM_TIMER_H
8 #define FRM_TIMER_H
9 
10 #include "framework\frm_types.h"
11 
12 #define MAX_TIMERS 10
13 
14 namespace Frm {
15 class Timer {
16  public:
17  //derive the function static Timer* GetInstance(void);
18  ~Timer(void){};
19  virtual void InitTimer(uint16 index=0){};
20  virtual uint32 GetTime(uint16 index=0){return 0;};
21 
22  protected:
23  Timer(void) {for(int i= 0; i<MAX_TIMERS; i++) {_old[i] = 0; _new[i] = 0;}};
25  static Timer* _Instance;
26 };
27 
28 };
29 #endif
Definition: Frm_Timer.h:15
uint32 _new[10]
Definition: Frm_Timer.h:24
uint32 _old[10]
Definition: Frm_Timer.h:23
~Timer(void)
Definition: Frm_Timer.h:18
Timer(void)
Definition: Frm_Timer.h:23
static Timer * _Instance
Definition: Frm_Timer.h:25
virtual void InitTimer(uint16 index=0)
Definition: Frm_Timer.h:19
virtual uint32 GetTime(uint16 index=0)
Definition: Frm_Timer.h:20
Definition: Frm.h:12
#define MAX_TIMERS
Definition: Frm_Timer.h:12
unsigned short int uint16
Definition: Frm_types.h:14
unsigned long int uint32
Definition: Frm_types.h:15
uint16 index
Definition: sample3.cpp:29