Main Page
Class Categories
Classes
Namespaces
File List
File Members
exper-sw
cosmosw
AugerSW
Offline
source
main
Utilities
Time
Stopwatch.h
Go to the documentation of this file.
1
#ifndef _utl_Stopwatch_h_
2
#define _utl_Stopwatch_h_
3
4
#include <sys/times.h>
5
#include <utl/AugerUnits.h>
6
7
namespace
utl {
8
16
class
Stopwatch
{
17
18
public
:
19
enum
CPUTime
{
20
eTotal
,
21
eUser
,
22
eSystem
23
};
24
25
Stopwatch
();
26
27
void
Reset
();
28
void
Start
();
29
void
Stop
();
30
double
GetCPUTime
(
const
CPUTime
kind =
eTotal
);
31
32
private
:
33
static
const
long
fgClockTicks
;
34
bool
fIsStopped
;
35
struct
tms
fStart
;
36
clock_t
fUserTimeSum
;
37
clock_t
fSystemTimeSum
;
38
39
};
40
41
}
// namespace utl
42
43
#endif
44
45
// Configure (x)emacs for this file ...
46
// Local Variables:
47
// mode: c++
48
// End:
utl::Stopwatch::eSystem
Definition:
Stopwatch.h:22
utl::Stopwatch::Stopwatch
Stopwatch()
Definition:
Stopwatch.cc:11
utl::Stopwatch::fStart
struct tms fStart
Definition:
Stopwatch.h:35
utl::Stopwatch::Stop
void Stop()
Definition:
Stopwatch.cc:39
utl::Stopwatch::eUser
Definition:
Stopwatch.h:21
utl::Stopwatch::fUserTimeSum
clock_t fUserTimeSum
Definition:
Stopwatch.h:36
utl::Stopwatch::Reset
void Reset()
Definition:
Stopwatch.cc:21
utl::Stopwatch
Definition:
Stopwatch.h:16
utl::Stopwatch::Start
void Start()
Definition:
Stopwatch.cc:29
utl::Stopwatch::fSystemTimeSum
clock_t fSystemTimeSum
Definition:
Stopwatch.h:37
utl::Stopwatch::fIsStopped
bool fIsStopped
Definition:
Stopwatch.h:34
utl::Stopwatch::CPUTime
CPUTime
Definition:
Stopwatch.h:19
utl::Stopwatch::fgClockTicks
static const long fgClockTicks
Definition:
Stopwatch.h:33
utl::Stopwatch::GetCPUTime
double GetCPUTime(const CPUTime kind=eTotal)
Definition:
Stopwatch.cc:52
utl::Stopwatch::eTotal
Definition:
Stopwatch.h:20
, generated on Tue Sep 26 2023.