File indexing completed on 2025-08-27 09:37:33
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef MBEDTLS_PLATFORM_TIME_H
0011 #define MBEDTLS_PLATFORM_TIME_H
0012
0013 #include "mbedtls/build_info.h"
0014
0015 #ifdef __cplusplus
0016 extern "C" {
0017 #endif
0018
0019
0020
0021
0022 #if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO)
0023 typedef MBEDTLS_PLATFORM_TIME_TYPE_MACRO mbedtls_time_t;
0024 #else
0025
0026 #include <time.h>
0027 typedef time_t mbedtls_time_t;
0028 #endif
0029
0030 #if defined(MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO)
0031 typedef MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO mbedtls_ms_time_t;
0032 #else
0033 #include <stdint.h>
0034 #include <inttypes.h>
0035 typedef int64_t mbedtls_ms_time_t;
0036 #endif
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051 mbedtls_ms_time_t mbedtls_ms_time(void);
0052
0053
0054
0055
0056 #if defined(MBEDTLS_PLATFORM_TIME_ALT)
0057 extern mbedtls_time_t (*mbedtls_time)(mbedtls_time_t *time);
0058
0059
0060
0061
0062
0063
0064
0065
0066 int mbedtls_platform_set_time(mbedtls_time_t (*time_func)(mbedtls_time_t *time));
0067 #else
0068 #if defined(MBEDTLS_PLATFORM_TIME_MACRO)
0069 #define mbedtls_time MBEDTLS_PLATFORM_TIME_MACRO
0070 #else
0071 #define mbedtls_time time
0072 #endif
0073 #endif
0074
0075 #ifdef __cplusplus
0076 }
0077 #endif
0078
0079 #endif