Rise
The Vieneo Province
performance.h
Go to the documentation of this file.
1 //class for timing / profiling code
2 
3 #ifndef hr_timer
4 #define hr_timer
5 
6 #include <WinSock2.h>
7 #include <WS2tcpip.h>
8 #include <Windows.h>
9 
10 class Logger;
11 
12 class CStopWatch
13 {
14 private:
16 
17  double fm_min;
18  double fm_max;
19  double fm_avg;
20  unsigned int fm_count;
21 
22  LARGE_INTEGER start;
23  LARGE_INTEGER stop;
24  LARGE_INTEGER frequency;
25  double LIToSecs( LARGE_INTEGER & L) ;
26  void getElapsedTime() ;
27 
28 public:
29  CStopWatch(Logger* prmLogger);
30  void startTimer();
31  void stopTimer();
32  void Report(const char* caption) const;
33 };
34 
35 #endif
Logger * logger
Definition: performance.h:15
Definition: Logger.h:9
CStopWatch(Logger *prmLogger)
Definition: performance.cpp:4
double fm_max
Definition: performance.h:18
void Report(const char *caption) const
Definition: performance.cpp:46
LARGE_INTEGER stop
Definition: performance.h:23
LARGE_INTEGER start
Definition: performance.h:22
double fm_avg
Definition: performance.h:19
void stopTimer()
Definition: performance.cpp:27
LARGE_INTEGER frequency
Definition: performance.h:24
unsigned int fm_count
Definition: performance.h:20
void startTimer()
Definition: performance.cpp:22
double LIToSecs(LARGE_INTEGER &L)
Definition: performance.cpp:17
double fm_min
Definition: performance.h:17
void getElapsedTime()
Definition: performance.cpp:33