aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/timer/TimerController.h
diff options
context:
space:
mode:
authorKieran Cawthray <kieranc@gmail.com>2021-06-16 16:33:34 +0200
committerKieran Cawthray <kieranc@gmail.com>2021-06-16 16:33:34 +0200
commitf5d756928ffef032fb5ac85e73f9a68b7b8f64dc (patch)
tree907608958d0be8a97a3d646c842fde3095cef939 /src/components/timer/TimerController.h
parentf2d01166c380b72ebcb13ef649def88ff4cf2d21 (diff)
parente90e8c7426f9a44e696b208a5b393a60476a3d43 (diff)
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
Diffstat (limited to 'src/components/timer/TimerController.h')
-rw-r--r--src/components/timer/TimerController.h13
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;
};