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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue