diff options
author | Jim Cromie <jim.cromie@gmail.com> | 2011-03-13 13:07:42 -0600 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-09-09 20:15:52 -0700 |
commit | b49055e966b614a7aa5d3eda7075ca3262694b6f (patch) | |
tree | 90bb9b306c559bc578d179d67d418ebae2ed8fa5 /t/TEST | |
parent | f7b9b043ef957755618188c0c17f55142f7a3506 (diff) | |
download | perl-b49055e966b614a7aa5d3eda7075ca3262694b6f.tar.gz |
save elapsed-time-ms in global hash for later reporting
Diffstat (limited to 't/TEST')
-rwxr-xr-x | t/TEST | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -159,6 +159,7 @@ $ENV{PERL_DESTRUCT_LEVEL} = 2 unless exists $ENV{PERL_DESTRUCT_LEVEL}; $ENV{EMXSHELL} = 'sh'; # For OS/2 if ($show_elapsed_time) { require Time::HiRes } +my %timings = (); # testname => [@et] pairs if $show_elapsed_time. my %skip = ( '.' => 1, @@ -725,12 +726,11 @@ EOT } else { if ($max) { - my $elapsed; + my ($elapsed, $etms) = ("", 0); if ( $show_elapsed_time ) { - $elapsed = sprintf( " %8.0f ms", (Time::HiRes::time() - $test_start_time) * 1000 ); - } - else { - $elapsed = ""; + $etms = (Time::HiRes::time() - $test_start_time) * 1000; + $elapsed = sprintf( " %8.0f ms", $etms); + $timings{$test} = $etms; } print "${te}ok$elapsed\n"; $good_files = $good_files + 1; |