[PATCH 10/10] agent: Fix timer round-up check when inserting an entry into cache.

* agent/cache.c (insert_to_timer_list): Round up when >= a half second.

--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Gbp-Pq: Topic from-master/gpg-agent-idling
Gbp-Pq: Name 0010-agent-Fix-timer-round-up-check-when-inserting-an-ent.patch
This commit is contained in:
NIIBE Yutaka 2023-09-04 12:00:29 +09:00 committed by linleiyong
parent 6c3c96e40b
commit 16f2794916
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ insert_to_timer_list (struct timespec *ts, ITEM entry)
if (the_timer_list)
{
the_timer_list->t.tv_sec += ts->tv_sec - entry->t.tv_sec;
if (ts->tv_nsec)
if (ts->tv_nsec >= 500000000)
the_timer_list->t.tv_sec++;
}