uloop: Fix incorrect timeout
authorHelmut Schaa <helmut.schaa@googlemail.com>
Wed, 24 Jul 2013 12:51:55 +0000 (14:51 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 24 Jul 2013 13:01:19 +0000 (15:01 +0200)
commit510e4956e58727d68fbf7dea1646a344d6901c91
tree45ed9d20a6c705b9262452cb4f49333903629e71
parent11e8afea0f7eb34f8c23a8e589ee659c46f3f8aa
uloop: Fix incorrect timeout

uloop timeouts are calculated based on a time value that was fetched
before any callbacks were executed. Hence, the next timeout is off by
the time the callback execution took which can lead to strange side
effects.

Fix this by calculating the next timeout based on a fresh time value.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
uloop.c