util
Class TimeSpan

java.lang.Object
  extended by util.TimeSpan

public class TimeSpan
extends Object

A time span is measured in milliseconds.


Field Summary
private  long ts
          My time span.
 
Constructor Summary
TimeSpan(Date start, Date end)
          Constructs a time span from star and end date.
TimeSpan(long duration)
          Constructs a new time span from a duration in ms.
 
Method Summary
 String toString()
          Formats this time span.
static String toString(long span)
          Formats a duration in milliseconds to a more readable string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ts

private long ts
My time span.

Constructor Detail

TimeSpan

public TimeSpan(long duration)
Constructs a new time span from a duration in ms.


TimeSpan

public TimeSpan(Date start,
                Date end)
Constructs a time span from star and end date.

Method Detail

toString

public String toString()
Formats this time span.

Overrides:
toString in class Object

toString

public static String toString(long span)
Formats a duration in milliseconds to a more readable string.