summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Automake/FileUtils.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Automake/FileUtils.pm b/lib/Automake/FileUtils.pm
index 697ff7e63..8d0b36802 100644
--- a/lib/Automake/FileUtils.pm
+++ b/lib/Automake/FileUtils.pm
@@ -39,9 +39,12 @@ use strict;
use warnings FATAL => 'all';
use Exporter;
-use Time::HiRes qw(stat);
use IO::File;
+# use sub-second resolution timestamps if available,
+# carry on with one-second resolution timestamps if that is all we have
+BEGIN { eval { require Time::HiRes; import Time::HiRes qw(stat) } }
+
use Automake::Channels;
use Automake::ChannelDefs;