FreeRTOS Monotonic Clock #46

Merged
muellerr merged 4 commits from meier/freertos-monotonic-clock into main 2025-01-07 10:33:29 +01:00
Showing only changes of commit 1427fbd2fe - Show all commits

View File

@ -5,6 +5,7 @@
#include "FreeRTOS.h" #include "FreeRTOS.h"
#include "fsfw/globalfunctions/timevalOperations.h" #include "fsfw/globalfunctions/timevalOperations.h"
#include "fsfw/serviceinterface/ServiceInterfacePrinter.h"
#include "fsfw/osal/freertos/Timekeeper.h" #include "fsfw/osal/freertos/Timekeeper.h"
#include "task.h" #include "task.h"
@ -47,8 +48,9 @@ ReturnValue_t Clock::getClock(timeval* time) {
} }
ReturnValue_t Clock::getClockMonotonic(timeval* time) { ReturnValue_t Clock::getClockMonotonic(timeval* time) {
// TODO: I don't actually know if the timekeeper is monotonic.. TickType_t ticks = Timekeeper::getTicks();
return getClock_timeval(time); *time = Timekeeper::ticksToTimeval(ticks);
return returnvalue::OK;
} }
ReturnValue_t Clock::getUptime(timeval* uptime) { ReturnValue_t Clock::getUptime(timeval* uptime) {