mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2025-12-06 07:12:32 +01: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…
Reference in a new issue