diff options
Diffstat (limited to 'src/queue.c')
-rw-r--r-- | src/queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/queue.c b/src/queue.c index 79f4e96..87ca255 100644 --- a/src/queue.c +++ b/src/queue.c @@ -81,7 +81,7 @@ int fastd_queue_timeout(fastd_queue *queue) { struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp); - int64_t diff_msec = ((int64_t)(queue->head->timeout.tv_sec-tp.tv_sec))*1000 - (queue->head->timeout.tv_nsec-tp.tv_nsec)/1e6; + int64_t diff_msec = ((int64_t)(queue->head->timeout.tv_sec-tp.tv_sec))*1000 + (queue->head->timeout.tv_nsec-tp.tv_nsec)/1e6; if (diff_msec < 0) return 0; else |