diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h index cfde4b7d0..4fafda64e 100644 --- a/include/mbedtls/mbedtls_config.h +++ b/include/mbedtls/mbedtls_config.h @@ -3610,7 +3610,7 @@ //#define MBEDTLS_PLATFORM_SETBUF_MACRO setbuf /**< Default setbuf macro to use, can be undefined */ //#define MBEDTLS_PLATFORM_TIME_MACRO time /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */ //#define MBEDTLS_PLATFORM_TIME_TYPE_MACRO time_t /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */ -//#define MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO signed long long /**< Default millionseconds time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled. It MUST be signed 64bit integer at least */ +//#define MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO int64_t /**< Default millionseconds time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled. It MUST be signed 64bit integer at least */ //#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */ //#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */ /* Note: your snprintf must correctly zero-terminate the buffer! */ diff --git a/include/mbedtls/platform_time.h b/include/mbedtls/platform_time.h index 246120ed3..3158e2a83 100644 --- a/include/mbedtls/platform_time.h +++ b/include/mbedtls/platform_time.h @@ -49,14 +49,14 @@ typedef int64_t mbedtls_ms_time_t; /** * \brief Get time in milliseconds. * - * \return Current time in milliseconds which is monotonically increasing. + * \return Monotonically-increasing current time in milliseconds. * - * \note If MBEDTLS_PLATFORM_MS_TIME_ALT defined, users can provide their own - * implementation. + * \note Define MBEDTLS_PLATFORM_MS_TIME_ALT to be able to provide an + * alternative implementation * - * \warning This function is used for time difference only. The start time is - * not defined. A well defined time function is not required in - * TLS negotiation. + * \warning This function returns a monotonically-increasing time value from a + * start time that will differ from platform to platform, and possibly + * from run to run of the process. * */ mbedtls_ms_time_t mbedtls_ms_time(void);