From 40f7e1c7be6882e01058b5ccf64d5005c6105346 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Tue, 11 Apr 2023 12:18:49 +0300 Subject: TimerController: Rename to Timer --- src/components/timer/Timer.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/components/timer/Timer.h (limited to 'src/components/timer/Timer.h') diff --git a/src/components/timer/Timer.h b/src/components/timer/Timer.h new file mode 100644 index 00000000..2469666f --- /dev/null +++ b/src/components/timer/Timer.h @@ -0,0 +1,26 @@ +#pragma once + +#include +#include + +#include + +namespace Pinetime { + namespace Controllers { + class Timer { + public: + Timer(void* timerData, TimerCallbackFunction_t timerCallbackFunction); + + void StartTimer(std::chrono::milliseconds duration); + + void StopTimer(); + + std::chrono::milliseconds GetTimeRemaining(); + + bool IsRunning(); + + private: + TimerHandle_t timer; + }; + } +} -- cgit v1.2.3-70-g09d2