Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etTimer.c')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etTimer.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etTimer.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etTimer.c
deleted file mode 100644
index a0076c25a..000000000
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etTimer.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "platform/etTimer.h"
-
-#include <sys/time.h>
-
-#include "etRuntimeConfig.h"
-
-void etTimer_init(void){
-}
-
-uint64 getTargetTimeUs(void){
- struct timeval currentTime;
- gettimeofday(&currentTime, NULL);
-
- return currentTime.tv_sec * 1000000L + currentTime.tv_usec;
-}
-
-etBool etTimer_executeNeeded(void){
-
- static uint64 lastTime = 0L;
-
- uint64 currentTime = getTargetTimeUs();
-
- uint64 timestep = 1000000L/FREQUENCY;
-
- if (currentTime >= lastTime + timestep) {
- lastTime = currentTime;
- return TRUE;
- }
- else {
- return FALSE;
- }
-}
-
-void getTimeFromTarget(etTargetTime_t *t){
- struct timeval currentTime;
- gettimeofday(&currentTime, NULL);
- t->sec = currentTime.tv_sec;
- t->nSec = currentTime.tv_usec*1000;
-}

Back to the top