diff options
| author | Kieran Cawthray <kieranc@gmail.com> | 2021-06-16 16:33:34 +0200 |
|---|---|---|
| committer | Kieran Cawthray <kieranc@gmail.com> | 2021-06-16 16:33:34 +0200 |
| commit | f5d756928ffef032fb5ac85e73f9a68b7b8f64dc (patch) | |
| tree | 907608958d0be8a97a3d646c842fde3095cef939 /src/components/timer/TimerController.h | |
| parent | f2d01166c380b72ebcb13ef649def88ff4cf2d21 (diff) | |
| parent | e90e8c7426f9a44e696b208a5b393a60476a3d43 (diff) | |
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
Diffstat (limited to 'src/components/timer/TimerController.h')
| -rw-r--r-- | src/components/timer/TimerController.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/components/timer/TimerController.h b/src/components/timer/TimerController.h index 5a0b293e..fa7bc90d 100644 --- a/src/components/timer/TimerController.h +++ b/src/components/timer/TimerController.h @@ -12,7 +12,7 @@ namespace Pinetime { class TimerController { public: - TimerController(Pinetime::System::SystemTask& systemTask); + TimerController() = default; void Init(); @@ -23,12 +23,13 @@ namespace Pinetime { uint32_t GetTimeRemaining(); bool IsRunning(); - + + void OnTimerEnd(); + + void Register(System::SystemTask* systemTask); + private: - System::SystemTask& systemTask; - - static void timerEnd(void* p_context); - + System::SystemTask* systemTask = nullptr; TickType_t endTicks; bool timerRunning = false; }; |
