File tree Expand file tree Collapse file tree 5 files changed +9
-21
lines changed Expand file tree Collapse file tree 5 files changed +9
-21
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,7 @@ TODO passed).
113113
114114=head3 C<run_time >
115115
116- The total time it took for the test to run, in seconds. If C<Time::HiRes > is
117- available, it will have finer granularity.
116+ The total time it took for the test to run, in seconds.
118117
119118=head3 C<num_todo >
120119
Original file line number Diff line number Diff line change @@ -18,10 +18,7 @@ Version 3.51_01
1818
1919our $VERSION = ' 3.51_01' ;
2020
21- use constant GOT_TIME_HIRES => do {
22- eval ' use Time::HiRes qw(time);' ;
23- $@ ? 0 : 1;
24- };
21+ use Time::HiRes qw( time) ;
2522
2623=head1 SYNOPSIS
2724
@@ -107,19 +104,14 @@ sub _make_callback {
107104
108105=head3 C<get_time >
109106
110- Return the current time using Time::HiRes if available .
107+ Return the current time.
111108
112109=cut
113110
114111sub get_time { return time () }
115112
116- =head3 C<time_is_hires >
117-
118- Return true if the time returned by get_time is high resolution (i.e. if Time::HiRes is available).
119-
120- =cut
121-
122- sub time_is_hires { return GOT_TIME_HIRES }
113+ # kept for backwards compatability
114+ sub time_is_hires { return 1 }
123115
124116=head3 C<get_times >
125117
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ Printing individual test results to STDOUT.
141141
142142=item * C<timer >
143143
144- Append run time for each test to output. Uses L<Time::HiRes> if available.
144+ Append run time for each test to output.
145145
146146=item * C<failures >
147147
Original file line number Diff line number Diff line change @@ -156,8 +156,7 @@ Set the verbosity level:
156156
157157=item * C<timer >
158158
159- Append run time for each test to output. Uses L<Time::HiRes> if
160- available.
159+ Append run time for each test to output.
161160
162161=item * C<failures >
163162
Original file line number Diff line number Diff line change @@ -14,16 +14,14 @@ use TAP::Parser::Source ();
1414use TAP::Parser::SourceHandler::Perl ();
1515
1616use Text::ParseWords qw( shellwords) ;
17+ use Time::HiRes ' time' ;
1718
1819use Config;
1920use base ' Exporter' ;
2021
2122# $ML $Last_ML_Print
2223
23- BEGIN {
24- eval q{ use Time::HiRes 'time'} ;
25- our $has_time_hires = !$@ ;
26- }
24+ our $has_time_hires = 1;
2725
2826=head1 NAME
2927
You can’t perform that action at this time.
0 commit comments