ecore: Fix logic bug in g_main_loop
authormike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 11 Jul 2011 02:51:37 +0000 (02:51 +0000)
committermike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 11 Jul 2011 02:51:37 +0000 (02:51 +0000)
Want to use timerfd if either seconds or nanoseconds is non-zero.

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@61224 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore/ecore_main.c

index c9ebc08..37b2c73 100644 (file)
@@ -520,7 +520,7 @@ _ecore_main_gsource_prepare(GSource *source __UNUSED__, gint *next_time)
                        ts.it_value.tv_nsec = fmod(t*NS_PER_SEC, NS_PER_SEC);
 
                        /* timerfd cannot sleep for 0 time */
-                       if (ts.it_value.tv_sec && ts.it_value.tv_nsec)
+                       if (ts.it_value.tv_sec || ts.it_value.tv_nsec)
                          {
                             r = timerfd_settime(timer_fd, 0, &ts, NULL);
                             if (r < 0)