diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-28 00:22:53 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-28 00:22:53 +0100 |
commit | c0f7708f4a36074817556d0966aeb54cc64a5b88 (patch) | |
tree | 0df79e295658cd740c29bc6959ade1b20add6653 /src | |
parent | 6c2649ab27f96dcc40a1f01a36a07d1603f39c51 (diff) | |
download | fastd-c0f7708f4a36074817556d0966aeb54cc64a5b88.tar fastd-c0f7708f4a36074817556d0966aeb54cc64a5b88.zip |
Fix sign in queue timeout calculation
Diffstat (limited to 'src')
-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 |