diff options
author | Uros Majstorovic <majstor@majstor.org> | 2022-03-12 13:08:52 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2022-03-12 13:08:52 +0100 |
commit | 3436ce5d3ffbc2777e785310bac971c830cbb4ff (patch) | |
tree | c3ffb0d18bb992e8b97818e4d0b369844979012d /ecp/src/platform/posix/time.c | |
parent | d359dd9981f4137e8873a7a571e5c54c5b2449c4 (diff) |
new rev compile OK
Diffstat (limited to 'ecp/src/platform/posix/time.c')
-rw-r--r-- | ecp/src/platform/posix/time.c | 9 |
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) {} |