diff --git a/library/timing.c b/library/timing.c index aee9dd4e7..6c4d57622 100644 --- a/library/timing.c +++ b/library/timing.c @@ -414,7 +414,9 @@ int mbedtls_timing_self_test( int verbose ) millisecs = mbedtls_timing_get_timer( &hires, 0 ); - if( millisecs < 900 * secs || millisecs > 1100 * secs ) + /* For some reason on Windows it looks like alarm has an extra delay + * (maybe related to creating a new thread). Allow some room here. */ + if( millisecs < 800 * secs || millisecs > 1200 * secs + 300 ) { if( verbose != 0 ) mbedtls_printf( "failed\n" );