Skip to content

Commit 5815c1f

Browse files
committed
Make Time::HiRes a mandatory dependency
1 parent 4f71641 commit 5815c1f

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

lib/TAP/Base.pm

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ Version 3.51_01
1818

1919
our $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
@@ -119,7 +116,7 @@ Return true if the time returned by get_time is high resolution (i.e. if Time::H
119116
120117
=cut
121118

122-
sub time_is_hires { return GOT_TIME_HIRES }
119+
sub time_is_hires { return 1 }
123120

124121
=head3 C<get_times>
125122

lib/Test/Harness.pm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@ use TAP::Parser::Source ();
1414
use TAP::Parser::SourceHandler::Perl ();
1515

1616
use Text::ParseWords qw(shellwords);
17+
use Time::HiRes 'time';
1718

1819
use Config;
1920
use 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

0 commit comments

Comments
 (0)