mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-29 21:33:02 +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);
|
||||
if (ret) {
|
||||
return 0;
|
||||
return time(NULL) * 1000;
|
||||
}
|
||||
|
||||
current_ms = tv.tv_sec;
|
||||
|
Loading…
x
Reference in New Issue
Block a user