Arik Hadas has posted comments on this change.
Change subject: backend: Add richer formatting of migration duration
......................................................................
Patch Set 2:
Martin, you can use DurationFormatUtils:
private static String dur(long start, long end) {
long per = end - start;
return DurationFormatUtils.formatDuration(per, pat(per), false);
}
private static String pat(long per) {
StringBuilder builder = new StringBuilder();
if (per > 60*60*1000)
builder.append("HH hour, ");
if (per > 60*1000)
builder.append("mm 'm'in, ");
builder.append("ss 's'ec");
return builder.toString();
}
--
To view, visit http://gerrit.ovirt.org/28405
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic6e8901be66480c7212fa3a98a28a332d13f13e8
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Martin Betak <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches