cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7819333875a783fdc73ad8244e3e9bd26b1e39d8

commit 7819333875a783fdc73ad8244e3e9bd26b1e39d8
Author: Cedric BAIL <[email protected]>
Date:   Fri Feb 3 11:12:28 2017 -0800

    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) */

-- 


Reply via email to