diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-06-10 10:50:49 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-06-10 10:50:49 (GMT) |
| commit | b0aadd14e6867b80f7357d4e162180aa9d9ba075 (patch) | |
| tree | 8f02285d8384fa30102d31086b5c21d190230da1 /src/components/timer/TimerController.h | |
| parent | b72a3ed87d9797f7746d6fbdb348972401e4414b (diff) | |
Revert "Integrate hatmajster's timer code"
This reverts commit b72a3ed87d9797f7746d6fbdb348972401e4414b.
Diffstat (limited to 'src/components/timer/TimerController.h')
| -rw-r--r-- | src/components/timer/TimerController.h | 24 |
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 +} |
