diff options
author | Henrik Rentz-Reichert | 2012-03-12 09:31:12 +0000 |
---|---|---|
committer | Henrik Rentz-Reichert | 2012-03-12 09:31:12 +0000 |
commit | 59f7b04b5a1db0119c1d896c1661c4cfa4228547 (patch) | |
tree | 86ef84204aa112fa73a210f653ceedfddcb17f0a /runtime/org.eclipse.etrice.runtime.c/src/platforms | |
parent | 73342e0b8b533fdd8007e0ee2900c4f93fc58467 (diff) | |
download | org.eclipse.etrice-59f7b04b5a1db0119c1d896c1661c4cfa4228547.tar.gz org.eclipse.etrice-59f7b04b5a1db0119c1d896c1661c4cfa4228547.tar.xz org.eclipse.etrice-59f7b04b5a1db0119c1d896c1661c4cfa4228547.zip |
[ui.structure] fixed positions of interface items on actor refs
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/platforms')
-rw-r--r-- | runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etTimer.c | 66 |
1 files changed, 33 insertions, 33 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 index 103529382..a2d463778 100644 --- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etTimer.c +++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etTimer.c @@ -1,33 +1,33 @@ -#include "platform/etTimer.h" - -#include <sys/time.h> - -#include "etGlobalFlags.h" - -void etTimer_init(void){ -} - -uint64 getTargetTimeUs(void){ - struct timeval time; - gettimeofday(&time, NULL); - - return time.tv_sec * 1000000L + time.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; - } -} - +#include "platform/etTimer.h"
+
+#include <sys/time.h>
+
+#include "etGlobalFlags.h"
+
+void etTimer_init(void){
+}
+
+uint64 getTargetTimeUs(void){
+ struct timeval time;
+ gettimeofday(&time, NULL);
+
+ return time.tv_sec * 1000000L + time.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;
+ }
+}
+
|