From: mike_m Date: Mon, 11 Jul 2011 02:51:37 +0000 (+0000) Subject: ecore: Fix logic bug in g_main_loop X-Git-Tag: 2.0_alpha~180^2~74 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03a27dd217a6c9cdf856ee90e2a590c4d143c075;p=framework%2Fuifw%2Fecore.git ecore: Fix logic bug in g_main_loop Want to use timerfd if either seconds or nanoseconds is non-zero. Signed-off-by: Mike McCormack git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@61224 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index c9ebc08..37b2c73 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -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)