net.pacbell.jfai.toh.ui
Class TimeIntervalFormat

java.lang.Object
  extended by net.pacbell.jfai.toh.ui.TimeIntervalFormat

public final class TimeIntervalFormat
extends Object

Utility class to format a time interval as a string representation.

Author:
Jürgen Failenschmid

Method Summary
static String format(long milliSeconds)
          Calculates a string representation of the given time interval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

format

public static String format(long milliSeconds)
Calculates a string representation of the given time interval. The interval is divided into up to four fields for days, hours, minutes, seconds.

Leading fields with value 0 are omitted. Trailing fields with value 0 are included. The value of the field for the number of seconds may have up to three decimal places.

Sample result: 20 days 1 hour 0 min 12.345 sec

Parameters:
milliSeconds - the time interval in ms
Returns:
a string representation of the time interval