mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-21 10:09:57 +01:00
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>
This commit is contained in:
parent
28364affa6
commit
d90f1e5fa4
@ -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…
x
Reference in New Issue
Block a user