summaryrefslogtreecommitdiff
path: root/src/components/timer/TimerController.h
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-04-10 02:40:16 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-04-10 02:40:16 (GMT)
commit9e5866fab5a7fc108f8d15265a69a681b2359d7c (patch)
tree4b8ffa230bc4df64ed97d06fa0b21445a0976053 /src/components/timer/TimerController.h
parent42d0d1ad338c55ca44f7f4cbb880c40e293b0d5c (diff)
Integrate hatmajster's timer code
Diffstat (limited to 'src/components/timer/TimerController.h')
-rw-r--r--src/components/timer/TimerController.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/components/timer/TimerController.h b/src/components/timer/TimerController.h
index fa7bc90..dbc9863 100644
--- a/src/components/timer/TimerController.h
+++ b/src/components/timer/TimerController.h
@@ -9,20 +9,22 @@ namespace Pinetime {
class SystemTask;
}
namespace Controllers {
-
+
class TimerController {
public:
TimerController() = default;
-
+
void Init();
-
void StartTimer(uint32_t duration);
-
void StopTimer();
-
- uint32_t GetTimeRemaining();
-
- bool IsRunning();
+ void StopAlerting();
+ int32_t GetSecondsRemaining();
+ bool IsOvertime() {
+ return overtime;
+ }
+ bool IsRunning() {
+ return timerRunning;
+ }
void OnTimerEnd();
@@ -32,6 +34,7 @@ namespace Pinetime {
System::SystemTask* systemTask = nullptr;
TickType_t endTicks;
bool timerRunning = false;
+ bool overtime = false;
};
}
} \ No newline at end of file