mbed TLS v2.6.0
platform_time.h
Go to the documentation of this file.
1 
25 #ifndef MBEDTLS_PLATFORM_TIME_H
26 #define MBEDTLS_PLATFORM_TIME_H
27 
28 #if !defined(MBEDTLS_CONFIG_FILE)
29 #include "config.h"
30 #else
31 #include MBEDTLS_CONFIG_FILE
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
46 /*
47  * The time_t datatype
48  */
49 #if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO)
50 typedef MBEDTLS_PLATFORM_TIME_TYPE_MACRO mbedtls_time_t;
51 #else
52 /* For time_t */
53 #include <time.h>
54 typedef time_t mbedtls_time_t;
55 #endif /* MBEDTLS_PLATFORM_TIME_TYPE_MACRO */
56 
57 /*
58  * The function pointers for time
59  */
60 #if defined(MBEDTLS_PLATFORM_TIME_ALT)
61 extern mbedtls_time_t (*mbedtls_time)( mbedtls_time_t* time );
62 
70 int mbedtls_platform_set_time( mbedtls_time_t (*time_func)( mbedtls_time_t* time ) );
71 #else
72 #if defined(MBEDTLS_PLATFORM_TIME_MACRO)
73 #define mbedtls_time MBEDTLS_PLATFORM_TIME_MACRO
74 #else
75 #define mbedtls_time time
76 #endif /* MBEDTLS_PLATFORM_TIME_MACRO */
77 #endif /* MBEDTLS_PLATFORM_TIME_ALT */
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif /* platform_time.h */
Configuration options (set of defines)
#define mbedtls_time
Definition: platform_time.h:75
time_t mbedtls_time_t
Definition: platform_time.h:54