* Console: Display durations with new formatDuration2()

This commit is contained in:
zzz
2010-11-06 12:28:38 +00:00
parent 1bc563832e
commit 010a1fde3f
17 changed files with 145 additions and 69 deletions

View File

@@ -102,7 +102,7 @@ public class TunnelRenderer {
out.write("<td class=\"cells\">&nbsp;</td>");
long timeLeft = cfg.getExpiration()-_context.clock().now();
if (timeLeft > 0)
out.write("<td class=\"cells\" align=\"center\">" + DataHelper.formatDuration(timeLeft) + "</td>");
out.write("<td class=\"cells\" align=\"center\">" + DataHelper.formatDuration2(timeLeft) + "</td>");
else
out.write("<td class=\"cells\" align=\"center\">(" + _("grace period") + ")</td>");
out.write("<td class=\"cells\" align=\"center\">" + cfg.getProcessedMessagesCount() + " KB</td>");
@@ -175,7 +175,7 @@ public class TunnelRenderer {
out.write("<tr> <td class=\"cells\" align=\"center\"><img src=\"/themes/console/images/inbound.png\" alt=\"Inbound\" title=\"Inbound\"></td>");
else
out.write("<tr> <td class=\"cells\" align=\"center\"><img src=\"/themes/console/images/outbound.png\" alt=\"Outbound\" title=\"Outbound\"></td>");
out.write(" <td class=\"cells\" align=\"center\">" + DataHelper.formatDuration(timeLeft) + "</td>\n");
out.write(" <td class=\"cells\" align=\"center\">" + DataHelper.formatDuration2(timeLeft) + "</td>\n");
out.write(" <td class=\"cells\" align=\"center\">" + info.getProcessedMessagesCount() + " KB</td>\n");
for (int j = 0; j < info.getLength(); j++) {
Hash peer = info.getPeer(j);