Omer Frenkel has submitted this change and it was merged.
Change subject: engine : Introduce TimeConverter
......................................................................
engine : Introduce TimeConverter
This patch introduces TimeUnitConverter that converts
(approximately) the input difference in times(long)
to a maximum expressable time unit.Currently it goes
upto days.
This patch is just a wrapper around the java concurrent
TimeUnit.The wrapper is written with the intention of
providing the additional facility of auto-converting
the lower unit time/time interval into its highest
possible expressible unit such that its value post
conversion > 1
Also,this patch just returns the integral magnitude and
unit of the highest expressable unit.
Change-Id: I045aaa4f93b345e0457e1a0ce2ccf0ceeb9071ad
Signed-off-by: Anmol Babu <anbabu(a)redhat.com>
---
A
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/TimeConverter.java
A
backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/utils/TimeConverterTest.java
2 files changed, 93 insertions(+), 0 deletions(-)
Approvals:
anmolbabu: Verified
Omer Frenkel: Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/27469
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I045aaa4f93b345e0457e1a0ce2ccf0ceeb9071ad
Gerrit-PatchSet: 20
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <anbabu(a)redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayilsa(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Ramesh N <rnachimu(a)redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtripat(a)redhat.com>
Gerrit-Reviewer: anmolbabu <anbabu(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server