-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/mbedtls_3_5_0_update_v5.1' into 'release/v5.1'
feat(mbedtls): update to 3.5.0 release (v5.1) See merge request espressif/esp-idf!26475
- Loading branch information
Showing
7 changed files
with
41 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "mbedtls/build_info.h" | ||
#include "mbedtls/platform_time.h" | ||
|
||
#ifdef MBEDTLS_PLATFORM_MS_TIME_ALT | ||
mbedtls_ms_time_t mbedtls_ms_time() | ||
{ | ||
int ret; | ||
struct timespec tv = {}; | ||
mbedtls_ms_time_t current_ms; | ||
|
||
ret = clock_gettime(CLOCK_MONOTONIC, &tv); | ||
if (ret) { | ||
return time(NULL) * 1000L; | ||
} | ||
|
||
current_ms = tv.tv_sec; | ||
return current_ms * 1000L + tv.tv_nsec / 1000000L; | ||
} | ||
#endif // MBEDTLS_PLATFORM_MS_TIME_ALT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters