diff options
| author | JF <jf@codingfield.com> | 2020-06-07 18:04:43 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-06-07 18:04:43 (GMT) |
| commit | e22c0609b542b133fe2effe8f91501d50b763d45 (patch) | |
| tree | 722461ec13de07daa1f67033e490b3af16549e6c /src/Components/DateTime/DateTimeController.h | |
| parent | baafb96f3089d7fc890b4b5ef65bb2934fce3f55 (diff) | |
Add uptime counter in DateTimeController and display it in SystemInfo screen.
Diffstat (limited to 'src/Components/DateTime/DateTimeController.h')
| -rw-r--r-- | src/Components/DateTime/DateTimeController.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Components/DateTime/DateTimeController.h b/src/Components/DateTime/DateTimeController.h index 1e65bd1..d602074 100644 --- a/src/Components/DateTime/DateTimeController.h +++ b/src/Components/DateTime/DateTimeController.h @@ -21,6 +21,7 @@ namespace Pinetime { uint8_t Seconds() const { return second; } std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> CurrentDateTime() const { return currentDateTime; } + std::chrono::seconds Uptime() const { return uptime; } private: uint16_t year = 0; Months month = Months::Unknown; @@ -32,7 +33,7 @@ namespace Pinetime { uint32_t previousSystickCounter = 0; std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> currentDateTime; - + std::chrono::seconds uptime {0}; }; } }
\ No newline at end of file |
