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 <anb...@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 <anb...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Ramesh N <rnach...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com>
Gerrit-Reviewer: anmolbabu <anb...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to