summaryrefslogtreecommitdiffstats
path: root/src/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/timer.c')
-rw-r--r--src/timer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/timer.c b/src/timer.c
index d1a4e7e0..da16459c 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -132,10 +132,10 @@ int osmo_timer_pending(struct osmo_timer_list *timer)
*/
struct timeval *osmo_timers_nearest(void)
{
- if (nearest_p != NULL)
- return nearest_p;
- else
- return NULL;
+ /* nearest_p is exactly what we need already: NULL if nothing is
+ * waiting, {0,0} if we must dispatch immediately, and the correct
+ * delay if we need to wait */
+ return nearest_p;
}
static void update_nearest(struct timeval *cand, struct timeval *current)