Skip to content

Commit 646a3e6

Browse files
committed
added milisceonds to the test time output
1 parent 5dfb2d9 commit 646a3e6

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
@@ -682,13 +682,13 @@ function main(): void
682682
if ($test_cnt) {
683683
putenv('NO_INTERACTION=1');
684684
usort($test_files, "test_sort");
685-
$start_time = time();
685+
$start_time = microtime(true);
686686

687687
echo "Running selected tests.\n";
688688

689689
$test_idx = 0;
690690
run_all_tests($test_files, $environment);
691-
$end_time = time();
691+
$end_time = microtime(true);
692692

693693
if ($failed_tests_file) {
694694
fclose($failed_tests_file);
@@ -730,13 +730,13 @@ function main(): void
730730
$test_files = array_unique($test_files);
731731
usort($test_files, "test_sort");
732732

733-
$start_time = time();
733+
$start_time = microtime(true);
734734
show_start($start_time);
735735

736736
$test_cnt = count($test_files);
737737
$test_idx = 0;
738738
run_all_tests($test_files, $environment);
739-
$end_time = time();
739+
$end_time = microtime(true);
740740

741741
if ($failed_tests_file) {
742742
fclose($failed_tests_file);
@@ -3064,7 +3064,7 @@ function get_summary(bool $show_ext_summary): string
30643064
$summary .= '
30653065
Tests passed : ' . sprintf('%5d (%5.1f%%)', $sum_results['PASSED'], $percent_results['PASSED']) . ' ' . sprintf('(%5.1f%%)', $x_passed) . '
30663066
---------------------------------------------------------------------
3067-
Time taken : ' . sprintf('%5d seconds', $end_time - $start_time) . '
3067+
Time taken : ' . sprintf('%5.3f seconds', $end_time - $start_time) . '
30683068
=====================================================================
30693069
';
30703070
$failed_test_summary = '';

0 commit comments

Comments
 (0)