ecore: Sleep at least until the next timeout
authormike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 5 Jul 2011 02:32:07 +0000 (02:32 +0000)
committermike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 5 Jul 2011 02:32:07 +0000 (02:32 +0000)
commit61bd0131b660d60b0ee86f993715bb6165ff1fa7
tree11fb84d2ba56b17e1be0ef55b3a184f2f1cb8444
parent688b60d22a4ae95097c0f5b06b17e8fb28123107
ecore: Sleep at least until the next timeout

The g_main_loop was spinning waiting for timers that were
almost ready.  The spinning was due to waking up from
the g_main_loop too early, and then having nothing to do.

To solve this, round the timeout up to the nearest millisecond,
so that when the main loop wakes, the timer will definitely be
ready.

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