1
0
forked from fsfw/fsfw

added uptime seconds functions

This commit is contained in:
2020-09-18 12:57:30 +02:00
parent 19632b8fb1
commit e70e9e3f1f
4 changed files with 26 additions and 2 deletions

View File

@ -106,6 +106,11 @@ ReturnValue_t Clock::getUptime(uint32_t* uptimeMs) {
return HasReturnvaluesIF::RETURN_OK;
}
uint32_t Clock::getUptimeSeconds() {
timeval uptime = getUptime();
return uptime.tv_sec;
}
ReturnValue_t Clock::getDateAndTime(TimeOfDay_t* time) {
// do some magic with chrono (C++20!)