-
Notifications
You must be signed in to change notification settings - Fork 99
/
Copy pathTimerGroup.h
58 lines (36 loc) · 925 Bytes
/
TimerGroup.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
DDS, a bridge double dummy solver.
Copyright (C) 2006-2014 by Bo Haglund /
2014-2018 by Bo Haglund & Soren Hein.
See LICENSE and README.
*/
#ifndef DDS_TIMERGROUP_H
#define DDS_TIMERGROUP_H
#include <string>
#include <vector>
#include "Timer.h"
using namespace std;
class TimerGroup
{
private:
vector<Timer> timers;
string bname;
public:
TimerGroup();
~TimerGroup() = default;
void Reset();
void SetNames(const string& baseName);
void Start(const unsigned no);
void End(const unsigned no);
bool Used() const;
void Differentiate();
void Sum(Timer& sum) const;
void operator -= (const TimerGroup& deduct);
string Header() const;
string DetailHeader() const;
string SumLine(const Timer& sumTotal) const;
string TimerLines(const Timer& sumTotal) const;
string DetailLines() const;
string DashLine() const;
};
#endif