summaryrefslogtreecommitdiff
path: root/ecp/src/platform/posix
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-05-19 15:29:21 +0200
committerUros Majstorovic <majstor@majstor.org>2022-05-19 15:29:21 +0200
commit67ff1e142a30bf4e799cc486ce2f6eee93c2e448 (patch)
tree6ea845f58db6ad9f689c4d7f5d68fabfd1ca11b8 /ecp/src/platform/posix
parent412a8f99928beff605805807b0f07f6bf8d0a965 (diff)
fe310 update
Diffstat (limited to 'ecp/src/platform/posix')
-rw-r--r--ecp/src/platform/posix/time.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ecp/src/platform/posix/time.c b/ecp/src/platform/posix/time.c
index efee4f8..7030bf3 100644
--- a/ecp/src/platform/posix/time.c
+++ b/ecp/src/platform/posix/time.c
@@ -9,17 +9,17 @@ int ecp_tm_init(ECPContext *ctx) {
return ECP_OK;
}
-ecp_sts_t ecp_tm_abstime_ms(ecp_sts_t msec) {
+ecp_sts_t ecp_tm_get_tick(void) {
struct timeval tv;
ecp_sts_t ms_now;
gettimeofday(&tv, NULL);
ms_now = tv.tv_sec * 1000 + tv.tv_usec / 1000;
- return ms_now + msec;
+ return ms_now;
}
-void ecp_tm_sleep_ms(ecp_sts_t msec) {
- usleep(msec*1000);
+void ecp_tm_sleep(ecp_sts_t msec) {
+ usleep(msec * 1000);
}
void ecp_tm_timer_set(ecp_sts_t next) {}