From: Darold Gilles Date: Mon, 12 Oct 2015 15:10:18 +0000 (+0200) Subject: Display 0ms instead of 0s when qery time is under the millisecond. Thanks to venkatab... X-Git-Tag: v7.2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=487dbe1730427dffca8f23985509e5e3531a5ee0;p=pgbadger Display 0ms instead of 0s when qery time is under the millisecond. Thanks to venkatabn for the report. --- diff --git a/pgbadger b/pgbadger index c0e8eb4..0020cc4 100755 --- a/pgbadger +++ b/pgbadger @@ -3019,7 +3019,7 @@ sub convert_time { my $time = shift; - return '0s' if (!$time); + return '0ms' if (!$time); my $days = int($time / 86400000); $time -= ($days * 86400000); @@ -3046,7 +3046,7 @@ sub convert_time $time = $days . $hours . $minutes . $seconds . $milliseconds; - $time = '0s' if ($time eq ''); + $time = '0ms' if ($time eq ''); return $time; }