mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-18 01:14:06 +00:00
change the clock source to MONOTONIC
We need a non-settable source to avoid security issues. Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
e7ea823d43
commit
205a741307
@ -181,7 +181,7 @@ mbedtls_ms_time_t mbedtls_ms_time(void)
|
||||
struct timespec tv;
|
||||
mbedtls_ms_time_t current_ms;
|
||||
|
||||
ret = clock_gettime(CLOCK_REALTIME, &tv);
|
||||
ret = clock_gettime(CLOCK_MONOTONIC, &tv);
|
||||
if (ret) {
|
||||
return time(NULL) * 1000;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user