Provide a dummy implementation of timing.c

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2022-03-02 11:20:23 -05:00
parent 06a00afeec
commit 09e803ce0d

View file

@ -45,15 +45,15 @@ struct _hr_time
#include <unistd.h>
#include <sys/types.h>
#include <sys/time.h>
#include <signal.h>
#if defined(MBEDTLS_HAVE_TIME)
#include <time.h>
#include <sys/time.h>
struct _hr_time
{
struct timeval start;
};
#endif
#endif /* _WIN32 && !EFIX64 && !EFI32 */
/**
@ -75,6 +75,7 @@ struct _hr_time
* get_timer(0) }` the value time1+time2 is only approximately
* the delay since the first reset.
*/
#if defined(MBEDTLS_HAVE_TIME)
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
unsigned long mbedtls_timing_get_timer( struct mbedtls_timing_hr_time *val, int reset )
@ -157,6 +158,26 @@ int mbedtls_timing_get_delay( void *data )
return( 0 );
}
#else
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;
(void) int_ms;
(void) fin_ms;
}
unsigned long mbedtls_timing_get_timer( struct mbedtls_timing_hr_time *val, int reset )
{
(void) val;
(void) reset;
return( 0 );
}
#endif /* MBEDTLS_HAVE_TIME */
#endif /* !MBEDTLS_TIMING_ALT */
#endif /* MBEDTLS_TIMING_C */