mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-06 21:40:11 +00:00
Return seconds when clock_gettime error
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
05bc87866e
commit
029e659bbb
@ -183,7 +183,7 @@ mbedtls_ms_time_t mbedtls_ms_time(void)
|
|||||||
|
|
||||||
ret = clock_gettime(CLOCK_REALTIME, &tv);
|
ret = clock_gettime(CLOCK_REALTIME, &tv);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
return 0;
|
return time(NULL) * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
current_ms = tv.tv_sec;
|
current_ms = tv.tv_sec;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user