diff options
Diffstat (limited to 'ecp/src/platform/posix/time.c')
-rw-r--r-- | ecp/src/platform/posix/time.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ecp/src/platform/posix/time.c b/ecp/src/platform/posix/time.c index 7030bf3..49a85e7 100644 --- a/ecp/src/platform/posix/time.c +++ b/ecp/src/platform/posix/time.c @@ -1,15 +1,20 @@ #include <stdlib.h> #include <unistd.h> +#include <time.h> #include <sys/time.h> -#include <core.h> -#include <tm.h> +#include <ecp/core.h> +#include <ecp/tm.h> int ecp_tm_init(ECPContext *ctx) { return ECP_OK; } -ecp_sts_t ecp_tm_get_tick(void) { +ecp_sts_t ecp_tm_get_s(void) { + return time(NULL); +} + +ecp_sts_t ecp_tm_get_ms(void) { struct timeval tv; ecp_sts_t ms_now; |