]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
dhcpcd: Use milliseconds rather than timespec for delays
authorRoy Marples <roy@marples.name>
Sat, 4 Jan 2020 07:32:34 +0000 (07:32 +0000)
committerRoy Marples <roy@marples.name>
Sat, 4 Jan 2020 07:32:34 +0000 (07:32 +0000)
src/dhcpcd.c

index c65fd49e4bdd3c13c754dd1475913f94d8a3e79a..d2b205ab92bfeacb029f109b850288336c5fb1ea 100644 (file)
@@ -824,12 +824,9 @@ dhcpcd_startinterface(void *arg)
                                if (IF_UPANDRUNNING(ifp))
                                        carrier = LINK_UP;
                                else {
-                                       struct timespec tv;
-
-                                       tv.tv_sec = 0;
-                                       tv.tv_nsec = IF_POLL_UP * NSEC_PER_MSEC;
-                                       eloop_timeout_add_tv(ifp->ctx->eloop,
-                                           &tv, dhcpcd_startinterface, ifp);
+                                       eloop_timeout_add_msec(ifp->ctx->eloop,
+                                           IF_POLL_UP * MSEC_PER_SEC,
+                                           dhcpcd_startinterface, ifp);
                                        return;
                                }
                        }