title: Do we have a TimeSpan sort of class in Java
body: <p>I was just wondering if there is a need of TimeSpan in <code>java.util</code> so that I can define how much hours,minutes and seconds are there in between these two times.</p>
  
  <p>From this <code>TimeSpan</code> we can have a time interval between two times. like</p>
  
  <pre><code>TimeSpan getTimeSpan( Date before, Date after ){...}
  </code></pre>
  
  <p>or </p>
  
  <pre><code>long timeSpan = System.currentTimeMillis();
  // ... long job
  timeSpan = System.currentTimeMillis() - timeSpan;
  
  TimeSpan ts = new TimeSpan(timeSpan);
  </code></pre>
  
  <p>and with this <code>TimeSpan</code> we can use it in <code>SimpleDateFormat</code>.</p>
  
  <pre><code>SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
  format.format( timsSpan );
  </code></pre>
  
  <p>I am not sure if this is already been implemented in Java but yet undiscovered by me.</p>