cgv
Loading...
Searching...
No Matches
stopwatch.h
1
#pragma once
2
3
#include "lib_begin.h"
4
5
namespace
cgv
{
6
namespace
utils {
7
34
class
CGV_API
stopwatch
35
{
36
public
:
37
//standard constructor starts time measurement; if silent is true the stopwatch does not print time upon destruction
38
stopwatch
(
bool
silent =
false
);
39
//start counting time
40
stopwatch
(
double
*result,
bool
silent =
false
);
41
// add_time adds the time ellapsed thus far
42
void
add_time();
43
//destructor stops time measurement and puts the result into cout
44
~stopwatch
();
46
double
get_elapsed_time()
const
;
48
double
restart();
49
private
:
50
void
init();
51
double
get_current_time(
long
long
& end)
const
;
52
long
long
start;
53
double
*resultd;
54
bool
silent;
55
};
56
57
}
58
}
59
60
#include <cgv/config/lib_end.h>
cgv::utils::stopwatch
A trivial stop watch class for time measurement.
Definition
stopwatch.h:35
cgv
the cgv namespace
Definition
print.h:11
cgv
utils
stopwatch.h
Generated by
1.9.8