File platform_time.h

Mbed TLS Platform time abstraction.

Typedefs

typedef time_t mbedtls_time_t
typedef int64_t mbedtls_ms_time_t

Functions

mbedtls_ms_time_t mbedtls_ms_time(void)

Get time in milliseconds.

Note

Define MBEDTLS_PLATFORM_MS_TIME_ALT to be able to provide an alternative implementation

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.

Returns

Monotonically-increasing current time in milliseconds.

int mbedtls_platform_set_time(mbedtls_time_t (*time_func)(mbedtls_time_t *time))

Set your own time function pointer.

Parameters

time_func – the time function implementation

Returns

0

Variables

mbedtls_time_t (*mbedtls_time)(mbedtls_time_t *time)