blob: 8c80a7ce49c98062f1c84eb619549b4ae41d3fc0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#ifndef PROFILE_CODEH
#define PROFILE_CODEH
#include "ace/High_Res_Timer.h"
#include <fstream>
class ACE_High_Res_Timer;
class Profile_Code
{
public:
Profile_Code (const std::string &file);
Profile_Code (){};
~Profile_Code ();
void start ();
void stop ();
void dump ();
private:
/// The high resolution Timer ...
ACE_High_Res_Timer timer_;
/// Elapsed time.
ACE_hrtime_t elapsed_time_;
std::ofstream file_;
/// state of the timer
bool running_;
};
#endif
|