Mbed TLS v3.6.3
Loading...
Searching...
No Matches
include
mbedtls
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
29
struct
mbedtls_timing_hr_time
{
30
uint64_t
MBEDTLS_PRIVATE
(opaque)[4];
31
};
32
36
typedef
struct
mbedtls_timing_delay_context
{
37
struct
mbedtls_timing_hr_time
MBEDTLS_PRIVATE
(timer);
38
uint32_t
MBEDTLS_PRIVATE
(int_ms);
39
uint32_t
MBEDTLS_PRIVATE
(fin_ms);
40
}
mbedtls_timing_delay_context
;
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
87
uint32_t
mbedtls_timing_get_final_delay
(
88
const
mbedtls_timing_delay_context
*data);
89
90
#ifdef __cplusplus
91
}
92
#endif
93
94
#endif
/* timing.h */
build_info.h
Build-time configuration info.
private_access.h
Macro wrapper for struct's members.
MBEDTLS_PRIVATE
#define MBEDTLS_PRIVATE(member)
Definition:
private_access.h:15
mbedtls_timing_delay_context
Context for mbedtls_timing_set/get_delay()
Definition:
timing.h:36
mbedtls_timing_hr_time
timer structure
Definition:
timing.h:29
mbedtls_timing_get_timer
unsigned long mbedtls_timing_get_timer(struct mbedtls_timing_hr_time *val, int reset)
mbedtls_timing_delay_context
struct mbedtls_timing_delay_context mbedtls_timing_delay_context
Context for mbedtls_timing_set/get_delay()
mbedtls_timing_get_final_delay
uint32_t mbedtls_timing_get_final_delay(const mbedtls_timing_delay_context *data)
Get the final timing delay.
mbedtls_timing_set_delay
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().)
mbedtls_timing_get_delay
int mbedtls_timing_get_delay(void *data)
Get the status of delays (Memory helper: number of delays passed.)
timing_alt.h
Generated on Mon May 26 2025 17:38:04 for Mbed TLS v3.6.3 by
1.9.6