summaryrefslogtreecommitdiff
path: root/ecp/src/platform/posix/time.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-03-12 13:08:52 +0100
committerUros Majstorovic <majstor@majstor.org>2022-03-12 13:08:52 +0100
commit3436ce5d3ffbc2777e785310bac971c830cbb4ff (patch)
treec3ffb0d18bb992e8b97818e4d0b369844979012d /ecp/src/platform/posix/time.c
parentd359dd9981f4137e8873a7a571e5c54c5b2449c4 (diff)
new rev compile OK
Diffstat (limited to 'ecp/src/platform/posix/time.c')
-rw-r--r--ecp/src/platform/posix/time.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ecp/src/platform/posix/time.c b/ecp/src/platform/posix/time.c
index 111e598..efee4f8 100644
--- a/ecp/src/platform/posix/time.c
+++ b/ecp/src/platform/posix/time.c
@@ -1,3 +1,4 @@
+#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
@@ -8,17 +9,17 @@ int ecp_tm_init(ECPContext *ctx) {
return ECP_OK;
}
-ecp_cts_t ecp_tm_abstime_ms(ecp_cts_t msec) {
+ecp_sts_t ecp_tm_abstime_ms(ecp_sts_t msec) {
struct timeval tv;
- ecp_cts_t ms_now;
+ ecp_sts_t ms_now;
gettimeofday(&tv, NULL);
ms_now = tv.tv_sec * 1000 + tv.tv_usec / 1000;
return ms_now + msec;
}
-void ecp_tm_sleep_ms(ecp_cts_t msec) {
+void ecp_tm_sleep_ms(ecp_sts_t msec) {
usleep(msec*1000);
}
-void ecp_tm_timer_set(ecp_cts_t next) {} \ No newline at end of file
+void ecp_tm_timer_set(ecp_sts_t next) {}