mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-12-12 16:21:17 +08:00
feat(tls): update esp-tls and tcp_transport from idf
Commit ID:88bf21b2
This commit is contained in:
@@ -6,8 +6,12 @@
|
||||
|
||||
#include "esp_transport_utils.h"
|
||||
|
||||
void esp_transport_utils_ms_to_timeval(int timeout_ms, struct timeval *tv)
|
||||
struct timeval* esp_transport_utils_ms_to_timeval(int timeout_ms, struct timeval *tv)
|
||||
{
|
||||
if (timeout_ms == -1) {
|
||||
return NULL;
|
||||
}
|
||||
tv->tv_sec = timeout_ms / 1000;
|
||||
tv->tv_usec = (timeout_ms - (tv->tv_sec * 1000)) * 1000;
|
||||
return tv;
|
||||
}
|
||||
Reference in New Issue
Block a user