From fc3aa3c0764eb1eca804ae6bee2145b7886d7e62 Mon Sep 17 00:00:00 2001 From: lurchi Date: Tue, 16 Jan 2018 18:44:58 +0100 Subject: [PATCH] return now if we found a task that is ready (optimization) --- src/util/scheduler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/scheduler.c b/src/util/scheduler.c index a14d4f1d7..0e7a16275 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c @@ -424,7 +424,7 @@ get_timeout () { if (0 != pos->reason) { - timeout = now; + return now; } else { @@ -435,7 +435,7 @@ get_timeout () { if (0 != pos->reason) { - timeout = now; + return now; } else if ((pos->timeout.abs_value_us != GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us) && (timeout.abs_value_us > pos->timeout.abs_value_us)) -- 2.25.1