summaryrefslogtreecommitdiff
path: root/src/components/timer/TimerController.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/timer/TimerController.h')
-rw-r--r--src/components/timer/TimerController.h24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/components/timer/TimerController.h b/src/components/timer/TimerController.h
index c3bdc2a..93d8afc 100644
--- a/src/components/timer/TimerController.h
+++ b/src/components/timer/TimerController.h
@@ -2,7 +2,6 @@
#include <FreeRTOS.h>
#include <timers.h>
-#include <cstdint>
namespace Pinetime {
namespace System {
@@ -14,28 +13,21 @@ namespace Pinetime {
public:
TimerController() = default;
+ void Init(System::SystemTask* systemTask);
+
void StartTimer(uint32_t duration);
+
void StopTimer();
- void StopAlerting();
- int32_t GetSecondsRemaining();
- inline bool IsOvertime() {
- return overtime;
- }
- inline bool IsRunning() {
- return timerRunning;
- }
- void OnTimerEnd();
+ uint32_t GetTimeRemaining();
- protected:
- friend class Pinetime::System::SystemTask;
- void Init(System::SystemTask* systemTask);
+ bool IsRunning();
+
+ void OnTimerEnd();
private:
System::SystemTask* systemTask = nullptr;
TimerHandle_t timer;
- bool timerRunning = false;
- bool overtime = false;
};
}
-} \ No newline at end of file
+}