Skip to content

Commit

Permalink
Timing self test: shorten redundant tests
Browse files Browse the repository at this point in the history
We don't need to test multiple delays in a self-test.
Save 5s of busy-wait.
  • Loading branch information
gilles-peskine-arm committed Dec 20, 2017
1 parent 8873bcc commit ada3ee8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/timing.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,9 @@ int mbedtls_timing_self_test( int verbose )
if( verbose != 0 )
mbedtls_printf( " TIMING test #1 (set_alarm / get_timer): " );

for( secs = 1; secs <= 3; secs++ )
{
secs = 1;

(void) mbedtls_timing_get_timer( &hires, 1 );

mbedtls_set_alarm( (int) secs );
Expand Down

0 comments on commit ada3ee8

Please sign in to comment.