Fix display of timeouts in gerrit show-caches

Timeouts of exactly 1 hour were displaying as 2.5 days, due to the
wrong set of units being applied.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-08-18 17:56:10 -07:00
parent 24c1ca23a6
commit 285e81a463

View File

@@ -127,15 +127,15 @@ final class AdminShowCaches extends CacheCommand {
}
String suffix = "secs";
if (ttl > 60) {
if (ttl >= 60) {
ttl /= 60;
suffix = "mins";
}
if (ttl > 60) {
if (ttl >= 60) {
ttl /= 60;
suffix = "hrs";
}
if (ttl > 24) {
if (ttl >= 24) {
ttl /= 24;
suffix = "days";
}