#include <moira_site.h>
#include <mrclient.h>
-#include <sys/time.h>
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *whoami;
static int count = 0;
-static struct timeval now;
+static time_t now;
struct service {
char name[17];
disp_svc(argv, "Should this be enabled?\n");
else if (atoi(argv[SVC_ENABLE]) &&
60 * atoi(argv[SVC_INTERVAL]) + 86400 + atoi(argv[SVC_DFCHECK])
- < now.tv_sec)
+ < now)
disp_svc(argv, "Service has not been updated\n");
return MR_CONT;
disp_sh(argv, "Should this be enabled?\n");
else if (atoi(argv[SH_ENABLE]) && update_int &&
60 * atoi(update_int) + 86400 + atoi(argv[SH_LASTSUCCESS])
- < now.tv_sec)
+ < now)
disp_sh(argv, "Host has not been updated\n");
return MR_CONT;
goto punt;
}
- gettimeofday(&now, 0);
+ now = time(NULL);
sq = sq_create();
/* Check services first */