From 7819333875a783fdc73ad8244e3e9bd26b1e39d8 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 3 Feb 2017 11:12:28 -0800 Subject: [PATCH] ecore: poller could actually be related to the main loop timing. Reduce call to ecore_time_get which is a syscall to gettimeofday. --- src/lib/ecore/ecore_poller.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore/ecore_poller.c b/src/lib/ecore/ecore_poller.c index 41afb6d..839c6f6 100644 --- a/src/lib/ecore/ecore_poller.c +++ b/src/lib/ecore/ecore_poller.c @@ -98,15 +98,15 @@ _ecore_poller_next_tick_eval(void) timer = ecore_timer_add(interval, _ecore_poller_cb_timer, NULL); else { - t = ecore_time_get(); + t = ecore_loop_time_get(); if (!EINA_FLT_EQ(interval, poll_cur_interval)) { t -= last_tick; /* time since we last ticked */ /* delete the timer and reset it to tick off in the new * time interval. at the tick this will be adjusted */ ecore_timer_del(timer); - timer = ecore_timer_add(interval - t, - _ecore_poller_cb_timer, NULL); + timer = ecore_timer_loop_add(interval - t, + _ecore_poller_cb_timer, NULL); } } } @@ -121,7 +121,7 @@ _ecore_poller_cb_timer(void *data EINA_UNUSED) int changes = 0; at_tick++; - last_tick = ecore_time_get(); + last_tick = ecore_loop_time_get(); /* we have 16 counters - each increments every time the poller counter * "ticks". it increments by the minimum interval (which can be 1, 2, 4, * 7, 16 etc. up to 32768) */ -- 2.7.4