implemented missing static function
This commit is contained in:
parent
0be418a553
commit
f15424be4f
@ -1,10 +1,10 @@
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <framework/serviceinterface/ServiceInterfaceStream.h>
|
||||
#include <framework/timemanager/Clock.h>
|
||||
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <linux/sysinfo.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
//#include <fstream>
|
||||
@ -65,6 +65,15 @@ ReturnValue_t Clock::getClock_usecs(uint64_t* time) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
timeval Clock::getUptime() {
|
||||
timeval uptime;
|
||||
auto result = getUptime(&uptime);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::error << "Clock::getUptime: Error getting uptime" << std::endl;
|
||||
}
|
||||
return uptime;
|
||||
}
|
||||
|
||||
ReturnValue_t Clock::getUptime(timeval* uptime) {
|
||||
//TODO This is not posix compatible and delivers only seconds precision
|
||||
struct sysinfo sysInfo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user