Timing self test: shorten redundant tests

We don't need to test multiple delays in a self-test.
Save 10s of busy-wait.
This commit is contained in:
Gilles Peskine 2017-12-20 22:33:11 +01:00
parent e405069608
commit 8833e86dcf

View File

@ -398,8 +398,8 @@ int timing_self_test( int verbose )
if( verbose != 0 )
polarssl_printf( " TIMING test #1 (m_sleep / get_timer): " );
for( secs = 1; secs <= 3; secs++ )
{
secs = 1;
(void) get_timer( &hires, 1 );
m_sleep( (int)( 500 * secs ) );
@ -416,8 +416,8 @@ int timing_self_test( int verbose )
if( verbose != 0 )
polarssl_printf( " TIMING test #2 (set_alarm / get_timer): " );
for( secs = 1; secs <= 3; secs++ )
{
secs = 1;
(void) get_timer( &hires, 1 );
set_alarm( (int) secs );