@@ -682,13 +682,13 @@ function main(): void
682
682
if ($ test_cnt ) {
683
683
putenv ('NO_INTERACTION=1 ' );
684
684
usort ($ test_files , "test_sort " );
685
- $ start_time = microtime (true );
685
+ $ start_time = hrtime (true );
686
686
687
687
echo "Running selected tests. \n" ;
688
688
689
689
$ test_idx = 0 ;
690
690
run_all_tests ($ test_files , $ environment );
691
- $ end_time = microtime (true );
691
+ $ end_time = hrtime (true );
692
692
693
693
if ($ failed_tests_file ) {
694
694
fclose ($ failed_tests_file );
@@ -730,13 +730,13 @@ function main(): void
730
730
$ test_files = array_unique ($ test_files );
731
731
usort ($ test_files , "test_sort " );
732
732
733
- $ start_time = microtime (true );
733
+ $ start_time = hrtime (true );
734
734
show_start ($ start_time );
735
735
736
736
$ test_cnt = count ($ test_files );
737
737
$ test_idx = 0 ;
738
738
run_all_tests ($ test_files , $ environment );
739
- $ end_time = microtime (true );
739
+ $ end_time = hrtime (true );
740
740
741
741
if ($ failed_tests_file ) {
742
742
fclose ($ failed_tests_file );
@@ -3064,7 +3064,7 @@ function get_summary(bool $show_ext_summary): string
3064
3064
$ summary .= '
3065
3065
Tests passed : ' . sprintf ('%5d (%5.1f%%) ' , $ sum_results ['PASSED ' ], $ percent_results ['PASSED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_passed ) . '
3066
3066
---------------------------------------------------------------------
3067
- Time taken : ' . sprintf ('%5.3f seconds ' , $ end_time - $ start_time ) . '
3067
+ Time taken : ' . sprintf ('%5.3f seconds ' , ( $ end_time - $ start_time) / 1e9 ) . '
3068
3068
=====================================================================
3069
3069
' ;
3070
3070
$ failed_test_summary = '' ;
@@ -3169,12 +3169,12 @@ function get_summary(bool $show_ext_summary): string
3169
3169
3170
3170
function show_start (int $ start_time ): void
3171
3171
{
3172
- echo "TIME START " . date ('Y-m-d H:i:s ' , $ start_time ) . "\n===================================================================== \n" ;
3172
+ echo "TIME START " . date ('Y-m-d H:i:s ' , $ start_time / 1e9 ) . "\n===================================================================== \n" ;
3173
3173
}
3174
3174
3175
3175
function show_end (int $ end_time ): void
3176
3176
{
3177
- echo "===================================================================== \nTIME END " . date ('Y-m-d H:i:s ' , $ end_time ) . "\n" ;
3177
+ echo "===================================================================== \nTIME END " . date ('Y-m-d H:i:s ' , $ end_time / 1e9 ) . "\n" ;
3178
3178
}
3179
3179
3180
3180
function show_summary (): void
0 commit comments