summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_lsa.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-01-24 11:43:32 -0500
committerGitHub <noreply@github.com>2017-01-24 11:43:32 -0500
commitac9ddce37d16af4e36c1ff945c12aaaf615e69d8 (patch)
tree4987937426f56c881cb2a83e607924c0103ab3b4 /ospf6d/ospf6_lsa.c
parente5951aa21dda9f8c9e87a8b892ae42a531e4e9f4 (diff)
parent39cea8220a9bcc51d97a7832760591e117cdde7a (diff)
Merge pull request #104 from opensourcerouting/time-cleanup
Time cleanup
Diffstat (limited to 'ospf6d/ospf6_lsa.c')
-rw-r--r--ospf6d/ospf6_lsa.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c
index 06962ec069..bea153c928 100644
--- a/ospf6d/ospf6_lsa.c
+++ b/ospf6d/ospf6_lsa.c
@@ -207,9 +207,7 @@ ospf6_lsa_age_set (struct ospf6_lsa *lsa)
assert (lsa && lsa->header);
- if (quagga_gettime (QUAGGA_CLK_MONOTONIC, &now) < 0)
- zlog_warn ("LSA: quagga_gettime failed, may fail LSA AGEs: %s",
- safe_strerror (errno));
+ monotime(&now);
lsa->birth.tv_sec = now.tv_sec - ntohs (lsa->header->age);
lsa->birth.tv_usec = now.tv_usec;
@@ -230,9 +228,7 @@ ospf6_lsa_age_current (struct ospf6_lsa *lsa)
assert (lsa->header);
/* current time */
- if (quagga_gettime (QUAGGA_CLK_MONOTONIC, &now) < 0)
- zlog_warn ("LSA: quagga_gettime failed, may fail LSA AGEs: %s",
- safe_strerror (errno));
+ monotime(&now);
if (ntohs (lsa->header->age) >= OSPF_LSA_MAXAGE)
{
@@ -513,7 +509,7 @@ ospf6_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
inet_ntop (AF_INET, &lsa->header->adv_router,
adv_router, sizeof (adv_router));
- quagga_gettime (QUAGGA_CLK_MONOTONIC, &now);
+ monotime(&now);
timersub (&now, &lsa->installed, &res);
timerstring (&res, duration, sizeof (duration));