summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_lsa.c
diff options
context:
space:
mode:
authorTakashi Sogabe <sogabe@iij.ad.jp>2009-06-22 13:07:02 +0900
committerPaul Jakma <paul@quagga.net>2009-06-22 12:21:22 +0100
commit86f72dcba35f055b5344deeb5f057c2f1d9a291f (patch)
treeb128af27119cf27a709423814709a5a0bde98bae /ospf6d/ospf6_lsa.c
parentf7e0db80693aea7f5fd3d8d4f00e97347c8d0ba5 (diff)
Convert ospf6d over to quagga_gettime() wrappers.
Diffstat (limited to 'ospf6d/ospf6_lsa.c')
-rw-r--r--ospf6d/ospf6_lsa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c
index e8290b63..108c025d 100644
--- a/ospf6d/ospf6_lsa.c
+++ b/ospf6d/ospf6_lsa.c
@@ -180,8 +180,8 @@ ospf6_lsa_age_set (struct ospf6_lsa *lsa)
assert (lsa && lsa->header);
- if (gettimeofday (&now, (struct timezone *)NULL) < 0)
- zlog_warn ("LSA: gettimeofday failed, may fail LSA AGEs: %s",
+ if (quagga_gettime (QUAGGA_CLK_MONOTONIC, &now) < 0)
+ zlog_warn ("LSA: quagga_gettime failed, may fail LSA AGEs: %s",
safe_strerror (errno));
lsa->birth.tv_sec = now.tv_sec - ntohs (lsa->header->age);
@@ -203,8 +203,8 @@ ospf6_lsa_age_current (struct ospf6_lsa *lsa)
assert (lsa->header);
/* current time */
- if (gettimeofday (&now, (struct timezone *)NULL) < 0)
- zlog_warn ("LSA: gettimeofday failed, may fail LSA AGEs: %s",
+ if (quagga_gettime (QUAGGA_CLK_MONOTONIC, &now) < 0)
+ zlog_warn ("LSA: quagga_gettime failed, may fail LSA AGEs: %s",
safe_strerror (errno));
/* calculate age */
@@ -351,7 +351,7 @@ ospf6_lsa_show_summary (struct vty *vty, struct ospf6_lsa *lsa)
inet_ntop (AF_INET, &lsa->header->adv_router, adv_router,
sizeof (adv_router));
- gettimeofday (&now, NULL);
+ quagga_gettime (QUAGGA_CLK_MONOTONIC, &now);
timersub (&now, &lsa->installed, &res);
timerstring (&res, duration, sizeof (duration));