From 86f72dcba35f055b5344deeb5f057c2f1d9a291f Mon Sep 17 00:00:00 2001 From: Takashi Sogabe Date: Mon, 22 Jun 2009 13:07:02 +0900 Subject: Convert ospf6d over to quagga_gettime() wrappers. --- ospf6d/ospf6_lsa.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ospf6d/ospf6_lsa.c') 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)); -- cgit v1.2.1