From 16e2b0213b54991d9f493d4c0ee7efca18436427 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 18 Nov 2015 01:23:21 +0100 Subject: Clean up peer task handling --- src/task.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/task.c') diff --git a/src/task.c b/src/task.c index e1dc77d..079fc4a 100644 --- a/src/task.c +++ b/src/task.c @@ -76,11 +76,10 @@ void fastd_task_reschedule(fastd_task_t *task, fastd_timeout_t timeout) { fastd_pqueue_insert(&ctx.task_queue, &task->entry); } -/** Gets the timeout of the next task (if any) */ -bool fastd_task_timeout(fastd_timeout_t *timeout) { +/** Gets the timeout of the next task in the task queue */ +fastd_timeout_t fastd_task_queue_timeout(void) { if (!ctx.task_queue) - return false; + return fastd_timeout_inv; - *timeout = ctx.task_queue->value; - return true; + return ctx.task_queue->value; } -- cgit v1.2.3