use strict;
use Imager;
use Getopt::Long;
+use Time::HiRes qw(time);
my $count = 1000;
GetOptions("c=i"=>\$count)
print " replace $offset/$len: ", unpack("H*", $ins), "\n";
substr($data, $offset, $len, $ins);
}
+ my $start = time;
my $im = Imager->new;
- if ($im->read(data => $data)) {
+ my $result = $im->read(data => $data);
+ my $dur = time() - $start;
+ if ($dur > 1.0) {
+ print "***Took too long to load\n";
+ }
+ printf " Took %f seconds\n", time() - $start;
+ if ($result) {
print "<< Success\n";
}
else {