diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-12 16:22:32 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-12 16:22:32 -0500 |
| commit | 23586b0552ee08e24d4c1f54bb4913c48c1e14aa (patch) | |
| tree | 93d735ba2c66dfe8512ce9a155dcf0e028991f76 | |
| parent | e6cc3dc98b5ffe78a843af60649e478d649ef93c (diff) | |
bfdd: Fix timer print-out function
The timer2str function thought 24 minutes was an hour and had a
couple of other issues that needed to be corrected.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| -rw-r--r-- | bfdd/bfd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c index 814366f320..7ab71511a6 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -770,10 +770,10 @@ void integer2timestr(uint64_t time, char *buf, size_t buflen) int rv; #define MINUTES (60) -#define HOURS (24 * MINUTES) -#define DAYS (30 * HOURS) -#define MONTHS (12 * DAYS) -#define YEARS (MONTHS) +#define HOURS (60 * MINUTES) +#define DAYS (24 * HOURS) +#define MONTHS (30 * DAYS) +#define YEARS (12 * MONTHS) if (time >= YEARS) { year = time / YEARS; time -= year * YEARS; |
