diff --git a/include/lib/util_time.h b/include/lib/util_time.h index 42b9741a..21e2d78e 100644 --- a/include/lib/util_time.h +++ b/include/lib/util_time.h @@ -19,6 +19,8 @@ #define MSEC_PER_SEC 1000L +#define SEC_PER_DAY (24 * 60 * 60) + /** * Convert nanoseconds to microseconds * diff --git a/zpcimon/zpcimon.c b/zpcimon/zpcimon.c index 98a2871a..40b6edd7 100644 --- a/zpcimon/zpcimon.c +++ b/zpcimon/zpcimon.c @@ -24,6 +24,7 @@ #include "lib/util_opt.h" #include "lib/util_fmt.h" #include "lib/util_libc.h" +#include "lib/util_time.h" #include @@ -102,7 +103,7 @@ static void parse_cmdline(int argc, char *argv[], struct options *opts) optarg); exit(EXIT_FAILURE); } - if (seconds < 86400) + if (seconds < SEC_PER_DAY) opts->interval_seconds = seconds; if (seconds < 1) opts->interval_seconds = 1;