diff options
| author | mark9064 <30447455+mark9064@users.noreply.github.com> | 2025-11-09 18:17:51 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-09 19:17:51 +0100 |
| commit | 99ae2f368bd3f9ca5521d2d04a426addbb00b04b (patch) | |
| tree | 8218788ee2ba3a60d9512c3c6e420ac980d5a4ad /src/displayapp/screens | |
| parent | 716deff7d0456cdd9eb1d152d3b29f1f39c7a231 (diff) | |
Refactor Timer component to provide expiry information (#2365)
Diffstat (limited to 'src/displayapp/screens')
| -rw-r--r-- | src/displayapp/screens/Timer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp index d5f2a2b7..6f086e02 100644 --- a/src/displayapp/screens/Timer.cpp +++ b/src/displayapp/screens/Timer.cpp @@ -118,7 +118,8 @@ void Timer::Refresh() { } void Timer::DisplayTime() { - displaySeconds = std::chrono::duration_cast<std::chrono::seconds>(timer.GetTimeRemaining()); + displaySeconds = + std::chrono::duration_cast<std::chrono::seconds>(timer.GetTimerState().value_or(Controllers::Timer::TimerStatus {}).distanceToExpiry); if (displaySeconds.IsUpdated()) { minuteCounter.SetValue(displaySeconds.Get().count() / 60); secondCounter.SetValue(displaySeconds.Get().count() % 60); |
