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:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user