Skip to content

Commit 628a3b1

Browse files
committed
added milisceonds to the test time output
1 parent ed6e289 commit 628a3b1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

run-tests.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -708,13 +708,13 @@ function main(): void
708708
if ($test_cnt) {
709709
putenv('NO_INTERACTION=1');
710710
usort($test_files, "test_sort");
711-
$start_time = time();
711+
$start_time = microtime(true);
712712

713713
echo "Running selected tests.\n";
714714

715715
$test_idx = 0;
716716
run_all_tests($test_files, $environment);
717-
$end_time = time();
717+
$end_time = microtime(true);
718718

719719
if ($failed_tests_file) {
720720
fclose($failed_tests_file);
@@ -762,13 +762,13 @@ function main(): void
762762
$test_files = array_unique($test_files);
763763
usort($test_files, "test_sort");
764764

765-
$start_time = time();
765+
$start_time = microtime(true);
766766
show_start($start_time);
767767

768768
$test_cnt = count($test_files);
769769
$test_idx = 0;
770770
run_all_tests($test_files, $environment);
771-
$end_time = time();
771+
$end_time = microtime(true);
772772

773773
if ($failed_tests_file) {
774774
fclose($failed_tests_file);
@@ -3117,7 +3117,7 @@ function get_summary(bool $show_ext_summary): string
31173117
$summary .= '
31183118
Tests passed : ' . sprintf('%5d (%5.1f%%)', $sum_results['PASSED'], $percent_results['PASSED']) . ' ' . sprintf('(%5.1f%%)', $x_passed) . '
31193119
---------------------------------------------------------------------
3120-
Time taken : ' . sprintf('%5d seconds', $end_time - $start_time) . '
3120+
Time taken : ' . sprintf('%5.3f seconds', $end_time - $start_time) . '
31213121
=====================================================================
31223122
';
31233123
$failed_test_summary = '';

0 commit comments

Comments
 (0)