diff --git a/client/speed_stats.C b/client/speed_stats.C index cdb98f3dfd..bbe819a4d1 100644 --- a/client/speed_stats.C +++ b/client/speed_stats.C @@ -265,6 +265,8 @@ void run_test_suite( double num_secs_per_test ) { } // One iteration == D_LOOP_ITERS (1,000,000) floating point operations +// If time_total is negative, there was an error in the calculation, +// meaning there is probably something wrong with the CPU clock_t double_flop_test( int iterations, int print_debug ) { double a[NUM_DOUBLES],t1,t2; @@ -314,10 +316,12 @@ clock_t double_flop_test( int iterations, int print_debug ) { calc_error = 1; } - temp /= 3; + temp /= 2; } - if( calc_error ) printf( "Calc error\n" ); + if( calc_error ) { + time_total *= -1; + } if( print_debug ) { for( i=0;i