@@ -5899,9 +5899,8 @@ if (timeit > 0)
5899
5899
{ SUB1 (pcre2_code_free , compiled_code ); }
5900
5900
}
5901
5901
total_compile_time += time_taken ;
5902
- fprintf (outfile , "Compile time %.4f milliseconds\n" ,
5903
- (((double )time_taken * 1000.0 ) / (double )timeit ) /
5904
- (double )CLOCKS_PER_SEC );
5902
+ fprintf (outfile , "Compile time %8.4f microseconds\n" ,
5903
+ ((1000000 / CLOCKS_PER_SEC ) * (double )time_taken ) / timeit );
5905
5904
}
5906
5905
5907
5906
/* A final compile that is used "for real". */
@@ -5932,9 +5931,8 @@ if (TEST(compiled_code, !=, NULL) && pat_patctl.jit != 0)
5932
5931
time_taken += clock () - start_time ;
5933
5932
}
5934
5933
total_jit_compile_time += time_taken ;
5935
- fprintf (outfile , "JIT compile %.4f milliseconds\n" ,
5936
- (((double )time_taken * 1000.0 ) / (double )timeit ) /
5937
- (double )CLOCKS_PER_SEC );
5934
+ fprintf (outfile , "JIT compile %8.4f microseconds\n" ,
5935
+ ((1000000 / CLOCKS_PER_SEC ) * (double )time_taken ) / timeit );
5938
5936
}
5939
5937
else
5940
5938
{
@@ -7687,9 +7685,8 @@ for (gmatched = 0;; gmatched++)
7687
7685
}
7688
7686
}
7689
7687
total_match_time += (time_taken = clock () - start_time );
7690
- fprintf (outfile , "Match time %.4f milliseconds\n" ,
7691
- (((double )time_taken * 1000.0 ) / (double )timeitm ) /
7692
- (double )CLOCKS_PER_SEC );
7688
+ fprintf (outfile , "Match time %7.4f microseconds\n" ,
7689
+ ((1000000 / CLOCKS_PER_SEC ) * (double )time_taken ) / timeitm );
7693
7690
}
7694
7691
7695
7692
/* Find the heap, match and depth limits if requested. The depth and heap
@@ -9493,18 +9490,16 @@ if (showtotaltimes)
9493
9490
fprintf (outfile , "--------------------------------------\n" );
9494
9491
if (timeit > 0 )
9495
9492
{
9496
- fprintf (outfile , "Total compile time %.4f milliseconds\n" ,
9497
- (((double )total_compile_time * 1000.0 ) / (double )timeit ) /
9498
- (double )CLOCKS_PER_SEC );
9493
+ fprintf (outfile , "Total compile time %8.2f microseconds\n" ,
9494
+ ((1000000 / CLOCKS_PER_SEC ) * (double )total_compile_time ) / timeit );
9499
9495
if (total_jit_compile_time > 0 )
9500
- fprintf (outfile , "Total JIT compile %.4f milliseconds \n" ,
9501
- ((( double ) total_jit_compile_time * 1000.0 ) / (double )timeit ) /
9502
- ( double ) CLOCKS_PER_SEC );
9496
+ fprintf (outfile , "Total JIT compile %8.2f microseconds \n" ,
9497
+ ((1000000 / CLOCKS_PER_SEC ) * (double )total_jit_compile_time ) / \
9498
+ timeit );
9503
9499
pad = " " ;
9504
9500
}
9505
- fprintf (outfile , "Total match time %s%.4f milliseconds\n" , pad ,
9506
- (((double )total_match_time * 1000.0 ) / (double )timeitm ) /
9507
- (double )CLOCKS_PER_SEC );
9501
+ fprintf (outfile , "Total match time %s%8.2f microseconds\n" , pad ,
9502
+ ((1000000 / CLOCKS_PER_SEC ) * (double )total_match_time ) / timeitm );
9508
9503
}
9509
9504
9510
9505
0 commit comments