linux changes adapted

This commit is contained in:
2020-12-14 21:54:03 +01:00
parent f2ba653833
commit 3ee25785a2
9 changed files with 26 additions and 24 deletions
+10 -10
View File
@@ -1,4 +1,3 @@
#include <fsfw/timemanager/Stopwatch.h>
#include "../../serviceinterface/ServiceInterfaceStream.h"
#include "../../timemanager/Clock.h"
@@ -86,15 +85,16 @@ ReturnValue_t Clock::getUptime(timeval* uptime) {
return HasReturnvaluesIF::RETURN_OK;
}
uint32_t Clock::getUptimeSeconds() {
//TODO This is not posix compatible and delivers only seconds precision
struct sysinfo sysInfo;
int result = sysinfo(&sysInfo);
if(result != 0){
return HasReturnvaluesIF::RETURN_FAILED;
}
return sysInfo.uptime;
}
// Wait for new FSFW Clock function delivering seconds uptime.
//uint32_t Clock::getUptimeSeconds() {
// //TODO This is not posix compatible and delivers only seconds precision
// struct sysinfo sysInfo;
// int result = sysinfo(&sysInfo);
// if(result != 0){
// return HasReturnvaluesIF::RETURN_FAILED;
// }
// return sysInfo.uptime;
//}
ReturnValue_t Clock::getUptime(uint32_t* uptimeMs) {
timeval uptime;