5DT Data Glove plugin  1.0
dTimer.h
1 
6 // LICENCE
7 
8 #ifndef __TIMER_H__
9 #define __TIMER_H__
10 
11 #include <Windows.h>
12 #include <ctime>
13 #include <algorithm>
14 
17 class Timer
18 {
19 public:
20 protected:
21  clock_t zeroClock;
22  DWORD mStartTick;
23  LONGLONG mLastTime;
24  LARGE_INTEGER mStartTime;
25  LARGE_INTEGER mFrequency;
26 private:
27 
28 public:
32  Timer();
33 
37  virtual ~Timer();
38 
41  void Reset();
42 
46  unsigned long GetMilliseconds();
47 
51  unsigned long GetMicroseconds();
52 
56  unsigned long GetMillisecondsCPU();
57 
61  unsigned long GetMicrosecondsCPU();
62 protected:
63 private:
64 };
65 
66 #endif