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 <mj.mccormack@samsung.com>

SVN revision: 61224
This commit is contained in:
Mike McCormack 2011-07-11 02:51:37 +00:00 committed by Mike McCormack
parent 81098de5a6
commit 4ff69d688c
1 changed files with 1 additions and 1 deletions

View 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)