mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 10:03:50 +01:00
39 lines
1.0 KiB
Diff
39 lines
1.0 KiB
Diff
From 76a15bfad81c3cd6b31222f8afdc050a69276170 Mon Sep 17 00:00:00 2001
|
|
From: Gunar Schorcht <gunar@schorcht.net>
|
|
Date: Sat, 1 Mar 2025 17:32:12 +0100
|
|
Subject: [PATCH 03/28] wpa_supplicant: use ztimer_sleep in os_sleep
|
|
|
|
---
|
|
components/wpa_supplicant/port/os_xtensa.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/components/wpa_supplicant/port/os_xtensa.c b/components/wpa_supplicant/port/os_xtensa.c
|
|
index 7a2309e8b5..57e16ddc6a 100644
|
|
--- a/components/wpa_supplicant/port/os_xtensa.c
|
|
+++ b/components/wpa_supplicant/port/os_xtensa.c
|
|
@@ -30,6 +30,8 @@
|
|
#include "utils/common.h"
|
|
#include "mbedtls/platform_util.h"
|
|
|
|
+#include "ztimer.h"
|
|
+
|
|
int os_get_time(struct os_time *t)
|
|
{
|
|
struct timeval tv;
|
|
@@ -53,10 +55,10 @@ int os_get_random(unsigned char *buf, size_t len)
|
|
void os_sleep(os_time_t sec, os_time_t usec)
|
|
{
|
|
if (sec) {
|
|
- sleep(sec);
|
|
+ ztimer_sleep(ZTIMER_SEC, sec);
|
|
}
|
|
if (usec) {
|
|
- usleep(usec);
|
|
+ ztimer_sleep(ZTIMER_USEC, usec);
|
|
}
|
|
}
|
|
|
|
--
|
|
2.34.1
|
|
|