1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Add accessor for timing final delay

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott
2022-03-09 15:34:37 +00:00
parent 7c92fe966a
commit b9af2db4cf
3 changed files with 40 additions and 2 deletions

View File

@ -158,13 +158,28 @@ int mbedtls_timing_get_delay( void *data )
return( 0 );
}
#else
int mbedtls_timing_get_delay( void *data )
/*
* Get the final delay.
*/
uint32_t mbedtls_timing_get_final_delay(
const mbedtls_timing_delay_context *data )
{
return( data->fin_ms );
}
#else /* MBEDTLS_HAVE_TIME */
uint32_t mbedtls_timing_get_final_delay(
const mbedtls_timing_delay_context *data )
{
(void) data;
return( 0 );
}
int mbedtls_timing_get_delay( void *data )
{
(void) data;
return( 0 );
}
void mbedtls_timing_set_delay( void *data, uint32_t int_ms, uint32_t fin_ms )
{
(void) data;
@ -178,6 +193,7 @@ unsigned long mbedtls_timing_get_timer( struct mbedtls_timing_hr_time *val, int
(void) reset;
return( 0 );
}
#endif /* MBEDTLS_HAVE_TIME */
#endif /* !MBEDTLS_TIMING_ALT */
#endif /* MBEDTLS_TIMING_C */