forked from enlightenment/efl
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:
parent
81098de5a6
commit
4ff69d688c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue