From 833eef974ad4721b9b3e247bae9c890476a936ce Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 18 Nov 2016 08:28:15 +0100 Subject: [PATCH] dirmngr: Use a longer timer tick interval. * dirmngr/dirmngr.c (TIMERTICK_INTERVAL): Always use 60 seconds like we did for WindowsCE. -- Given that the timer tick is only used for housekeeping tasks and these are done every 10 minutes, it makes no sense to use 2 seconds. The minor drawback is tha the housekeeping may be delayed by one minute. NB: For the purpose of power saving, we already make sure that the process wakes up at the full second so that it is synchronized to the wakeup time of other processes. Signed-off-by: Werner Koch --- dirmngr/dirmngr.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c index 2a6729e4d..7214d49e7 100644 --- a/dirmngr/dirmngr.c +++ b/dirmngr/dirmngr.c @@ -296,17 +296,10 @@ static int active_connections; * thread to run background network tasks. */ static int network_activity_seen; -/* The timer tick used for housekeeping stuff. For Windows we use a - longer period as the SetWaitableTimer seems to signal earlier than - the 2 seconds. All values are in seconds. */ -#if defined(HAVE_W32CE_SYSTEM) -# define TIMERTICK_INTERVAL (60) -#elif defined(HAVE_W32_SYSTEM) -# define TIMERTICK_INTERVAL (4) -#else -# define TIMERTICK_INTERVAL (2) -#endif +/* The timer tick used for housekeeping stuff. */ +#define TIMERTICK_INTERVAL (60) +/* How oft to run the housekeeping. */ #define HOUSEKEEPING_INTERVAL (600)