timing.h
mbedtls/private_access.h
mbedtls/build_info.h
stdint.h
mbedtls/build_info.h
mbedtls/check_config.h
mbedtls/config_adjust_legacy_crypto.h
mbedtls/config_adjust_psa_from_legacy.h
mbedtls/config_adjust_psa_superset_legacy.h
mbedtls/config_adjust_ssl.h
mbedtls/config_adjust_x509.h
mbedtls/config_psa.h
mbedtls/mbedtls_config.h
mbedtls/private_access.h
timing.h
psa/crypto_adjust_auto_enabled.h
psa/crypto_adjust_config_dependencies.h
psa/crypto_adjust_config_key_pair_types.h
psa/crypto_adjust_config_synonyms.h
psa/crypto_legacy.h
limits.h
stdint.h
mbedtls_timing_hr_time
mbedtls_timing_delay_context
struct mbedtls_timing_delay_context typedef struct mbedtls_timing_delay_context mbedtls_timing_delay_context mbedtls_timing_delay_context

Context for mbedtls_timing_set/get_delay()

unsigned long unsigned long mbedtls_timing_get_timer (struct mbedtls_timing_hr_time *val, int reset) mbedtls_timing_get_timer struct mbedtls_timing_hr_time * val int reset
void void mbedtls_timing_set_delay (void *data, uint32_t int_ms, uint32_t fin_ms) 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()`.)

data

Pointer to timing data. Must point to a valid `mbedtls_timing_delay_context` struct.

int_ms

First (intermediate) delay in milliseconds. The effect if int_ms > fin_ms is unspecified.

fin_ms

Second (final) delay in milliseconds. Pass 0 to cancel the current delay.

To set a single delay, either use `mbedtls_timing_set_timer` directly or use this function with int_ms == fin_ms.

int int mbedtls_timing_get_delay (void *data) mbedtls_timing_get_delay void * data

Get the status of delays (Memory helper: number of delays passed.)

data

Pointer to timing data Must point to a valid `mbedtls_timing_delay_context` struct.

-1 if cancelled (fin_ms = 0), 0 if none of the delays are passed, 1 if only the intermediate delay is passed, 2 if the final delay is passed.

uint32_t uint32_t mbedtls_timing_get_final_delay (const mbedtls_timing_delay_context *data) mbedtls_timing_get_final_delay const mbedtls_timing_delay_context * data

Get the final timing delay.

data

Pointer to timing data Must point to a valid `mbedtls_timing_delay_context` struct.

Final timing delay in milliseconds.

Portable interface to timeouts and to the CPU cycle counter.

    /*
    *CopyrightTheMbedTLSContributors
    *SPDX-License-Identifier:Apache-2.0ORGPL-2.0-or-later
    */
    #ifndefMBEDTLS_TIMING_H
    #defineMBEDTLS_TIMING_H
    #include"mbedtls/private_access.h"

    #include"mbedtls/build_info.h"

    #include<stdint.h>

    #ifdef__cplusplus
    extern"C"{
    #endif

    #if!defined(MBEDTLS_TIMING_ALT)
    //Regularimplementation
    //

    structmbedtls_timing_hr_time{
    uint64_tMBEDTLS_PRIVATE(opaque)[4];
    };

    typedefstructmbedtls_timing_delay_context{
    structmbedtls_timing_hr_timeMBEDTLS_PRIVATE(timer);
    uint32_tMBEDTLS_PRIVATE(int_ms);
    uint32_tMBEDTLS_PRIVATE(fin_ms);
    }mbedtls_timing_delay_context;

    #else/*MBEDTLS_TIMING_ALT*/
    #include"timing_alt.h"
    #endif/*MBEDTLS_TIMING_ALT*/

    /*Internaluse*/
    unsignedlongmbedtls_timing_get_timer(structmbedtls_timing_hr_time*val,intreset);

    voidmbedtls_timing_set_delay(void*data,uint32_tint_ms,uint32_tfin_ms);

    intmbedtls_timing_get_delay(void*data);

    uint32_tmbedtls_timing_get_final_delay(
    constmbedtls_timing_delay_context*data);

    #ifdef__cplusplus
    }
    #endif

    #endif/*timing.h*/