diff options
author | lurchi <lurchi@strangeplace.net> | 2018-01-16 18:44:58 +0100 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2018-01-16 18:44:58 +0100 |
commit | fc3aa3c0764eb1eca804ae6bee2145b7886d7e62 (patch) | |
tree | 190300e1361620ee34f25cc9f2dbdddc6360f5d5 /src/util/scheduler.c | |
parent | dcb1ec0a1da2760918b8316c0e9b3596bc1f4190 (diff) | |
download | gnunet-fc3aa3c0764eb1eca804ae6bee2145b7886d7e62.tar.gz gnunet-fc3aa3c0764eb1eca804ae6bee2145b7886d7e62.zip |
return now if we found a task that is ready (optimization)
Diffstat (limited to 'src/util/scheduler.c')
-rw-r--r-- | src/util/scheduler.c | 4 |
1 files 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 () | |||
424 | { | 424 | { |
425 | if (0 != pos->reason) | 425 | if (0 != pos->reason) |
426 | { | 426 | { |
427 | timeout = now; | 427 | return now; |
428 | } | 428 | } |
429 | else | 429 | else |
430 | { | 430 | { |
@@ -435,7 +435,7 @@ get_timeout () | |||
435 | { | 435 | { |
436 | if (0 != pos->reason) | 436 | if (0 != pos->reason) |
437 | { | 437 | { |
438 | timeout = now; | 438 | return now; |
439 | } | 439 | } |
440 | else if ((pos->timeout.abs_value_us != GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us) && | 440 | else if ((pos->timeout.abs_value_us != GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us) && |
441 | (timeout.abs_value_us > pos->timeout.abs_value_us)) | 441 | (timeout.abs_value_us > pos->timeout.abs_value_us)) |