|
@@ -34,7 +34,7 @@ void Stopwatch::stop() {
|
34
|
34
|
|
35
|
35
|
if (!this->isRunning()) return;
|
36
|
36
|
|
37
|
|
- this->status = STPWTCH_STOPPED;
|
|
37
|
+ this->state = STPWTCH_STOPPED;
|
38
|
38
|
this->stopTimestamp = millis();
|
39
|
39
|
}
|
40
|
40
|
|
|
@@ -45,7 +45,7 @@ void Stopwatch::pause() {
|
45
|
45
|
|
46
|
46
|
if (!this->isRunning()) return;
|
47
|
47
|
|
48
|
|
- this->status = STPWTCH_PAUSED;
|
|
48
|
+ this->state = STPWTCH_PAUSED;
|
49
|
49
|
this->stopTimestamp = millis();
|
50
|
50
|
}
|
51
|
51
|
|
|
@@ -59,7 +59,7 @@ void Stopwatch::start() {
|
59
|
59
|
if (this->isPaused()) this->accumulator = this->duration();
|
60
|
60
|
else this->reset();
|
61
|
61
|
|
62
|
|
- this->status = STPWTCH_RUNNING;
|
|
62
|
+ this->state = STPWTCH_RUNNING;
|
63
|
63
|
this->startTimestamp = millis();
|
64
|
64
|
}
|
65
|
65
|
|
|
@@ -68,18 +68,18 @@ void Stopwatch::reset() {
|
68
|
68
|
debug(PSTR("reset"));
|
69
|
69
|
#endif
|
70
|
70
|
|
71
|
|
- this->status = STPWTCH_STOPPED;
|
|
71
|
+ this->state = STPWTCH_STOPPED;
|
72
|
72
|
this->startTimestamp = 0;
|
73
|
73
|
this->stopTimestamp = 0;
|
74
|
74
|
this->accumulator = 0;
|
75
|
75
|
}
|
76
|
76
|
|
77
|
77
|
bool Stopwatch::isRunning() {
|
78
|
|
- return (this->status == STPWTCH_RUNNING) ? true : false;
|
|
78
|
+ return (this->state == STPWTCH_RUNNING) ? true : false;
|
79
|
79
|
}
|
80
|
80
|
|
81
|
81
|
bool Stopwatch::isPaused() {
|
82
|
|
- return (this->status == STPWTCH_PAUSED) ? true : false;
|
|
82
|
+ return (this->state == STPWTCH_PAUSED) ? true : false;
|
83
|
83
|
}
|
84
|
84
|
|
85
|
85
|
uint16_t Stopwatch::duration() {
|