Mbed TLS v3.6.3
Loading...
Searching...
No Matches
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
13
14#include "mbedtls/build_info.h"
15
16#include <stdint.h>
17
18#ifdef __cplusplus
19extern "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 */
47unsigned long mbedtls_timing_get_timer(struct mbedtls_timing_hr_time *val, int reset);
48
63void mbedtls_timing_set_delay(void *data, uint32_t int_ms, uint32_t fin_ms);
64
78
89
90#ifdef __cplusplus
91}
92#endif
93
94#endif /* timing.h */
Build-time configuration info.
Macro wrapper for struct's members.
#define MBEDTLS_PRIVATE(member)
Context for mbedtls_timing_set/get_delay()
Definition: timing.h:36
timer structure
Definition: timing.h:29
unsigned long mbedtls_timing_get_timer(struct mbedtls_timing_hr_time *val, int reset)
struct mbedtls_timing_delay_context mbedtls_timing_delay_context
Context for mbedtls_timing_set/get_delay()
uint32_t mbedtls_timing_get_final_delay(const mbedtls_timing_delay_context *data)
Get the final timing 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().)
int mbedtls_timing_get_delay(void *data)
Get the status of delays (Memory helper: number of delays passed.)