aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-08 11:25:04 -0800
committerJunio C Hamano <gitster@pobox.com>2010-12-08 11:25:04 -0800
commit4af004a16379ca846e975f84b00c18c4af3d177a (patch)
tree1ed6a8cbc3e894b41b9a611b45d5e50bdcf20e96 /gitweb
parent3d90c796503efa3ca9812575a41cb8b019d27218 (diff)
parent3962f1d756ab41c1d180e35483d1c8dffe51e0d1 (diff)
downloadgit-4af004a16379ca846e975f84b00c18c4af3d177a.tar.gz
git-4af004a16379ca846e975f84b00c18c4af3d177a.tar.xz
Merge branch 'jn/gitweb-time-hires-comes-with-5.8'
* jn/gitweb-time-hires-comes-with-5.8: gitweb: Time::HiRes is in core for Perl 5.8
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl12
1 files changed, 5 insertions, 7 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a1a3797b6..75306ca96 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -17,12 +17,10 @@ use Encode;
use Fcntl ':mode';
use File::Find qw();
use File::Basename qw(basename);
+use Time::HiRes qw(gettimeofday tv_interval);
binmode STDOUT, ':utf8';
-our $t0;
-if (eval { require Time::HiRes; 1; }) {
- $t0 = [Time::HiRes::gettimeofday()];
-}
+our $t0 = [ gettimeofday() ];
our $number_of_git_cmds = 0;
BEGIN {
@@ -1078,7 +1076,7 @@ sub dispatch {
}
sub reset_timer {
- our $t0 = [Time::HiRes::gettimeofday()]
+ our $t0 = [ gettimeofday() ]
if defined $t0;
our $number_of_git_cmds = 0;
}
@@ -3651,7 +3649,7 @@ sub git_footer_html {
print "<div id=\"generating_info\">\n";
print 'This page took '.
'<span id="generating_time" class="time_span">'.
- Time::HiRes::tv_interval($t0, [Time::HiRes::gettimeofday()]).
+ tv_interval($t0, [ gettimeofday() ]).
' seconds </span>'.
' and '.
'<span id="generating_cmd">'.
@@ -5517,7 +5515,7 @@ sub git_blame_common {
print 'END';
if (defined $t0 && gitweb_check_feature('timed')) {
print ' '.
- Time::HiRes::tv_interval($t0, [Time::HiRes::gettimeofday()]).
+ tv_interval($t0, [ gettimeofday() ]).
' '.$number_of_git_cmds;
}
print "\n";