|
@@ -33,7 +33,7 @@ bool Stopwatch::stop() {
|
33
|
33
|
#endif
|
34
|
34
|
|
35
|
35
|
if (this->isRunning() || this->isPaused()) {
|
36
|
|
- this->state = STOPWATCH_STOPPED;
|
|
36
|
+ this->state = STOPPED;
|
37
|
37
|
this->stopTimestamp = millis();
|
38
|
38
|
return true;
|
39
|
39
|
}
|
|
@@ -46,7 +46,7 @@ bool Stopwatch::pause() {
|
46
|
46
|
#endif
|
47
|
47
|
|
48
|
48
|
if (this->isRunning()) {
|
49
|
|
- this->state = STOPWATCH_PAUSED;
|
|
49
|
+ this->state = PAUSED;
|
50
|
50
|
this->stopTimestamp = millis();
|
51
|
51
|
return true;
|
52
|
52
|
}
|
|
@@ -62,7 +62,7 @@ bool Stopwatch::start() {
|
62
|
62
|
if (this->isPaused()) this->accumulator = this->duration();
|
63
|
63
|
else this->reset();
|
64
|
64
|
|
65
|
|
- this->state = STOPWATCH_RUNNING;
|
|
65
|
+ this->state = RUNNING;
|
66
|
66
|
this->startTimestamp = millis();
|
67
|
67
|
return true;
|
68
|
68
|
}
|
|
@@ -74,18 +74,18 @@ void Stopwatch::reset() {
|
74
|
74
|
Stopwatch::debug(PSTR("reset"));
|
75
|
75
|
#endif
|
76
|
76
|
|
77
|
|
- this->state = STOPWATCH_STOPPED;
|
|
77
|
+ this->state = STOPPED;
|
78
|
78
|
this->startTimestamp = 0;
|
79
|
79
|
this->stopTimestamp = 0;
|
80
|
80
|
this->accumulator = 0;
|
81
|
81
|
}
|
82
|
82
|
|
83
|
83
|
bool Stopwatch::isRunning() {
|
84
|
|
- return (this->state == STOPWATCH_RUNNING) ? true : false;
|
|
84
|
+ return (this->state == RUNNING) ? true : false;
|
85
|
85
|
}
|
86
|
86
|
|
87
|
87
|
bool Stopwatch::isPaused() {
|
88
|
|
- return (this->state == STOPWATCH_PAUSED) ? true : false;
|
|
88
|
+ return (this->state == PAUSED) ? true : false;
|
89
|
89
|
}
|
90
|
90
|
|
91
|
91
|
millis_t Stopwatch::duration() {
|