-
Notifications
You must be signed in to change notification settings - Fork 0
/
Counter.h
48 lines (36 loc) · 883 Bytes
/
Counter.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
#ifndef COUNTER_H_
#define COUNTER_H_
#include <string>
#include <ctime>
class Counter
{
public:
// Constructor and destructor
Counter(std::string pInitString, double pMaximum, int pColor=42);
virtual ~Counter();
// Start counter
void printini();
// Update counter
void update();
// Quit counter
void quit();
private:
// Set the color of the prompt
void setcolor();
// String that is shown before counter
std::string mInitString;
// maximum of the counter
double mMaximumInTicks;
double mTicksPartialBlock;
double mTicksPerBlock;
double mTicksPerBlockPart;
double mTicks;
// The color of the counter
int mColor;
// Bright color?
int mBold;
// Begin and current counter.
time_t mCBegin;
time_t mCNow;
};
#endif /*COUNTER_H_*/