Skip to content

Commit

Permalink
make Time::HiRes optional
Browse files Browse the repository at this point in the history
  • Loading branch information
sitaramc committed May 7, 2014
1 parent 0a2e038 commit 8e915ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/Gitolite/Common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ sub dd {
}

{
use Time::HiRes;
my %start_times;

eval "require Time::HiRes";
# we just ignore any errors from this; nothing needs to be done as long as
# no code *calls* either of the next two functions.

sub t_start {
my $name = shift || 'default';
$start_times{$name} = [ Time::HiRes::gettimeofday() ];
Expand Down

0 comments on commit 8e915ff

Please sign in to comment.