00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _TIMER_H_
00022 #define _TIMER_H_
00023
00024 #include <boost\shared_array.hpp>
00025 #include <windows.h>
00026
00027 namespace TestFrameWork
00028 {
00029
00035 class Timer
00036 {
00037 public:
00039 Timer(int samplesCount);
00040
00042 ~Timer(void);
00043
00048 float ElapsedTime(void);
00049
00050 float MeanElapsedTime(void) const;
00051
00052 private:
00053 int m_samplesCount;
00054
00055 boost::shared_array<float> m_elapsedTimeSamples;
00056
00057 int m_samplesInsertionIndex;
00058
00060 float m_timeFactor;
00061
00063 LONGLONG m_lastTime;
00064
00069 float ConfigureTimeCounter(void) const;
00070 };
00071
00072 }
00073
00074 #endif