summaryrefslogtreecommitdiff
path: root/src/components/timer/TimerController.h
diff options
context:
space:
mode:
authorhassless <85612141+hassless@users.noreply.github.com>2021-06-18 17:17:26 +0200
committerGitHub <noreply@github.com>2021-06-18 17:17:26 +0200
commit84a6c88e98d8b1420edbddd7b67a38737bf5cbb2 (patch)
treeb10cab7ef1a7645fa897aabb179c2e8849a919d7 /src/components/timer/TimerController.h
parentd0df278b0be2aae0493d901569a094dba221ce99 (diff)
parente90e8c7426f9a44e696b208a5b393a60476a3d43 (diff)
Merge branch 'JF002:develop' into improve-battery-percentage-to-battery-icon-mapping
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;
};