summaryrefslogtreecommitdiffstats
path: root/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2015-05-12 08:30:21 +0000
committerRoy Marples <roy@marples.name>2015-05-12 08:30:21 +0000
commitb3f1735bbff5416aa5c9c6f3a9258e4f7aeaeb80 (patch)
tree49aa325359ac7d0583c96de74f95fee9dd48ea92 /ipv6.c
parent629225460b229a86e467b0c667cc5f631b77dbab (diff)
downloaddhcpcd-b3f1735bbff5416aa5c9c6f3a9258e4f7aeaeb80.tar.xz
Replace get_monotonic usage with the standard clock_gettime.
Diffstat (limited to 'ipv6.c')
-rw-r--r--ipv6.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipv6.c b/ipv6.c
index 759bc1e3..b3a3a5f2 100644
--- a/ipv6.c
+++ b/ipv6.c
@@ -685,7 +685,7 @@ ipv6_addaddr(struct ipv6_addr *ap, const struct timespec *now)
struct timespec n;
if (now == NULL) {
- get_monotonic(&n);
+ clock_gettime(CLOCK_MONOTONIC, &n);
now = &n;
}
timespecsub(now, &ap->acquired, &n);
@@ -838,7 +838,7 @@ ipv6_addaddrs(struct ipv6_addrhead *addrs)
if (ap->flags & IPV6_AF_NEW)
i++;
if (!timespecisset(&now))
- get_monotonic(&now);
+ clock_gettime(CLOCK_MONOTONIC, &now);
ipv6_addaddr(ap, &now);
}
}
@@ -884,7 +884,7 @@ ipv6_freedrop_addrs(struct ipv6_addrhead *addrs, int drop,
DHCPCD_EXITING) && apf)
{
if (!timespecisset(&now))
- get_monotonic(&now);
+ clock_gettime(CLOCK_MONOTONIC, &now);
ipv6_addaddr(apf, &now);
}
if (drop == 2)
@@ -1475,7 +1475,7 @@ ipv6_tempdadcallback(void *arg)
ia->iface->name);
return;
}
- get_monotonic(&tv);
+ clock_gettime(CLOCK_MONOTONIC, &tv);
if ((ia1 = ipv6_createtempaddr(ia, &tv)) == NULL)
logger(ia->iface->ctx, LOG_ERR,
"ipv6_createtempaddr: %m");
@@ -1701,7 +1701,7 @@ ipv6_regentempaddr(void *arg)
logger(ia->iface->ctx, LOG_DEBUG, "%s: regen temp addr %s",
ia->iface->name, ia->saddr);
- get_monotonic(&tv);
+ clock_gettime(CLOCK_MONOTONIC, &tv);
ia1 = ipv6_createtempaddr(ia, &tv);
if (ia1)
ipv6_addaddr(ia1, &tv);