1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

net/uhcp: convert to ztimer

This commit is contained in:
Karl Fessel 2022-02-23 16:55:51 +01:00
parent cdffc8f0ca
commit a42c39dbea
2 changed files with 3 additions and 3 deletions

View File

@ -167,7 +167,7 @@ endif
ifneq (,$(filter uhcpc,$(USEMODULE)))
USEMODULE += posix_inet
USEMODULE += xtimer
USEMODULE += ztimer_msec
endif
ifneq (,$(filter netdev_tap,$(USEMODULE)))

View File

@ -12,7 +12,7 @@
#include "net/af.h"
#include "net/sock/udp.h"
#include "net/uhcp.h"
#include "xtimer.h"
#include "ztimer.h"
/**
* @brief Request prefix from uhcp server
@ -51,7 +51,7 @@ void uhcp_client(uhcp_iface_t iface)
res = sock_udp_recv(&sock, buf, sizeof(buf), 10U*US_PER_SEC, &remote);
if (res > 0) {
uhcp_handle_udp(buf, res, remote.addr.ipv6, remote.port, iface);
xtimer_sleep(60);
ztimer_sleep(ZTIMER_MSEC, 60 * MS_PER_SEC);
}
else {
LOG_ERROR("uhcp_client(): no reply received\n");