Loading [MathJax]/extensions/tex2jax.js
OGS
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
Typedefs
b
c
e
f
h
j
k
l
m
n
p
q
r
s
t
v
w
x
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
l
m
n
p
r
s
t
v
y
Classes
Class List
Class Index
Class Hierarchy
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
Functions
a
c
d
e
f
g
i
m
o
p
r
s
t
v
w
x
Variables
Typedefs
Enumerations
Macros
a
b
c
e
g
h
i
l
m
n
o
p
r
s
t
v
w
x
CPUTime.h
Go to the documentation of this file.
1
15
#pragma once
16
17
#include <ctime>
18
19
namespace
BaseLib
20
{
22
class
CPUTime
23
{
24
public
:
26
void
start
() {
start_time_
= clock(); }
27
29
double
elapsed
()
const
30
{
31
return
(clock() -
start_time_
) /
static_cast<
double
>
(CLOCKS_PER_SEC);
32
}
33
34
private
:
35
double
start_time_
= 0.;
36
};
37
38
}
// end namespace BaseLib
BaseLib::CPUTime
Count CPU time.
Definition:
CPUTime.h:23
BaseLib::CPUTime::start
void start()
Start the timer.
Definition:
CPUTime.h:26
BaseLib::CPUTime::start_time_
double start_time_
Definition:
CPUTime.h:35
BaseLib::CPUTime::elapsed
double elapsed() const
Get the elapsed time after started.
Definition:
CPUTime.h:29
BaseLib
Definition:
TestDefinition.h:19
BaseLib
CPUTime.h
Generated by
1.9.1