@@ -708,13 +708,13 @@ function main(): void
708
708
if ($ test_cnt ) {
709
709
putenv ('NO_INTERACTION=1 ' );
710
710
usort ($ test_files , "test_sort " );
711
- $ start_time = microtime (true );
711
+ $ start_time = hrtime (true );
712
712
713
713
echo "Running selected tests. \n" ;
714
714
715
715
$ test_idx = 0 ;
716
716
run_all_tests ($ test_files , $ environment );
717
- $ end_time = microtime (true );
717
+ $ end_time = hrtime (true );
718
718
719
719
if ($ failed_tests_file ) {
720
720
fclose ($ failed_tests_file );
@@ -762,13 +762,13 @@ function main(): void
762
762
$ test_files = array_unique ($ test_files );
763
763
usort ($ test_files , "test_sort " );
764
764
765
- $ start_time = microtime (true );
765
+ $ start_time = hrtime (true );
766
766
show_start ($ start_time );
767
767
768
768
$ test_cnt = count ($ test_files );
769
769
$ test_idx = 0 ;
770
770
run_all_tests ($ test_files , $ environment );
771
- $ end_time = microtime (true );
771
+ $ end_time = hrtime (true );
772
772
773
773
if ($ failed_tests_file ) {
774
774
fclose ($ failed_tests_file );
@@ -3117,7 +3117,7 @@ function get_summary(bool $show_ext_summary): string
3117
3117
$ summary .= '
3118
3118
Tests passed : ' . sprintf ('%5d (%5.1f%%) ' , $ sum_results ['PASSED ' ], $ percent_results ['PASSED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_passed ) . '
3119
3119
---------------------------------------------------------------------
3120
- Time taken : ' . sprintf ('%5.3f seconds ' , $ end_time - $ start_time ) . '
3120
+ Time taken : ' . sprintf ('%5.3f seconds ' , ( $ end_time - $ start_time) / 1e9 ) . '
3121
3121
=====================================================================
3122
3122
' ;
3123
3123
$ failed_test_summary = '' ;
@@ -3222,12 +3222,12 @@ function get_summary(bool $show_ext_summary): string
3222
3222
3223
3223
function show_start ($ start_time ): void
3224
3224
{
3225
- echo "TIME START " . date ('Y-m-d H:i:s ' , $ start_time ) . "\n===================================================================== \n" ;
3225
+ echo "TIME START " . date ('Y-m-d H:i:s ' , $ start_time / 1e9 ) . "\n===================================================================== \n" ;
3226
3226
}
3227
3227
3228
3228
function show_end ($ end_time ): void
3229
3229
{
3230
- echo "===================================================================== \nTIME END " . date ('Y-m-d H:i:s ' , $ end_time ) . "\n" ;
3230
+ echo "===================================================================== \nTIME END " . date ('Y-m-d H:i:s ' , $ end_time / 1e9 ) . "\n" ;
3231
3231
}
3232
3232
3233
3233
function show_summary (): void
0 commit comments