mirror of https://gitee.com/openkylin/gnupg2.git
[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:
parent
6c3c96e40b
commit
16f2794916
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue