Mbed TLS v3.6.3
timing.h
Go to the documentation of this file.
1 
6 /*
7  * Copyright The Mbed TLS Contributors
8  * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
9  */
10 #ifndef MBEDTLS_TIMING_H
11 #define MBEDTLS_TIMING_H
12 #include "mbedtls/private_access.h"
13 
14 #include "mbedtls/build_info.h"
15 
16 #include <stdint.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #if !defined(MBEDTLS_TIMING_ALT)
23 // Regular implementation
24 //
25 
30  uint64_t MBEDTLS_PRIVATE(opaque)[4];
31 };
32 
38  uint32_t MBEDTLS_PRIVATE(int_ms);
39  uint32_t MBEDTLS_PRIVATE(fin_ms);
41 
42 #else /* MBEDTLS_TIMING_ALT */
43 #include "timing_alt.h"
44 #endif /* MBEDTLS_TIMING_ALT */
45 
46 /* Internal use */
47 unsigned long mbedtls_timing_get_timer(struct mbedtls_timing_hr_time *val, int reset);
48 
63 void mbedtls_timing_set_delay(void *data, uint32_t int_ms, uint32_t fin_ms);
64 
77 int mbedtls_timing_get_delay(void *data);
78 
88  const mbedtls_timing_delay_context *data);
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #endif /* timing.h */
struct mbedtls_timing_delay_context mbedtls_timing_delay_context
Context for mbedtls_timing_set/get_delay()
#define MBEDTLS_PRIVATE(member)
void mbedtls_timing_set_delay(void *data, uint32_t int_ms, uint32_t fin_ms)
Set a pair of delays to watch (See mbedtls_timing_get_delay().)
Context for mbedtls_timing_set/get_delay()
Definition: timing.h:36
uint32_t mbedtls_timing_get_final_delay(const mbedtls_timing_delay_context *data)
Get the final timing delay.
Macro wrapper for struct's members.
Build-time configuration info.
unsigned long mbedtls_timing_get_timer(struct mbedtls_timing_hr_time *val, int reset)
timer structure
Definition: timing.h:29
int mbedtls_timing_get_delay(void *data)
Get the status of delays (Memory helper: number of delays passed.)