From 810dde21ee65653c15606917b19566cfbaaf165e Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Tue, 9 Aug 2022 21:54:45 +0200 Subject: ecp server added --- ecp/src/platform/fe310/time.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ecp/src/platform/fe310/time.c') diff --git a/ecp/src/platform/fe310/time.c b/ecp/src/platform/fe310/time.c index 5e4bc26..4bf530c 100644 --- a/ecp/src/platform/fe310/time.c +++ b/ecp/src/platform/fe310/time.c @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include #include #include @@ -23,7 +23,11 @@ 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 eos_time_get_tick() / EOS_TIMER_RTC_FREQ; +} + +ecp_sts_t ecp_tm_get_ms(void) { return eos_time_get_tick() * 1000 / EOS_TIMER_RTC_FREQ; } -- cgit v1.2.3