1
0
forked from fsfw/fsfw

new stopwatch :-)

This commit is contained in:
2020-04-08 19:33:01 +02:00
parent 826e2bdb2d
commit 2a72e94d6f
6 changed files with 161 additions and 13 deletions

View File

@ -3,8 +3,11 @@
#include <stdlib.h>
#include "Timekeeper.h"
extern "C" {
#include <FreeRTOS.h>
#include <task.h>
}
//TODO sanitize input?
//TODO much of this code can be reused for tick-only systems
@ -56,7 +59,6 @@ ReturnValue_t Clock::getUptime(timeval* uptime) {
timeval Clock::getUptime() {
TickType_t ticksSinceStart = xTaskGetTickCount();
return Timekeeper::ticksToTimeval(ticksSinceStart);
}