Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
itpp
base
timing.h
Go to the documentation of this file.
1
29
#ifndef TIMING_H
30
#define TIMING_H
31
32
33
namespace
itpp
34
{
35
44
class
Timer
45
{
46
public
:
48
Timer
();
50
virtual
~Timer
() { }
52
void
start
(
void
);
54
double
stop
(
void
);
56
void
reset
(
double
t = 0.0);
58
void
tic
(
void
);
60
double
toc
(
void
);
62
void
toc_print
(
void
);
64
double
get_time
()
const
;
65
66
protected
:
68
virtual
double
get_current_time
()
const
= 0;
70
double
start_time
;
72
double
stop_time
;
74
double
elapsed_time
;
76
bool
running
;
77
};
78
103
class
CPU_Timer
:
public
Timer
104
{
105
public
:
107
CPU_Timer
() { }
108
109
protected
:
111
double
get_current_time
()
const
;
112
};
113
137
class
Real_Timer
:
public
Timer
138
{
139
public
:
141
Real_Timer
() { }
142
143
protected
:
145
double
get_current_time
()
const
;
146
};
147
152
void
tic
();
153
158
double
toc
();
159
164
void
toc_print
();
165
174
void
pause
(
double
t = -1);
175
176
}
// namespace itpp
177
178
#endif // #ifndef TIMING_H
Generated on Fri Mar 21 2014 17:14:13 for IT++ by
Doxygen
1.8.1.2