title: Difference between two times in android
body: <p>I want to get difference between two times. I calculate this by using following. </p>
  
  <p><a href="https://stackoverflow.com/questions/635935/how-can-i-calculate-a-time-span-in-java-and-format-the-output">using this</a></p>
  
  <p>But i want to calculate three difference. For example i have 6 TIME as following.</p>
  
  <p>time1, time2, time3, time4</p>
  
  <p>And I want to calculate difference between two times like </p>
  
  <p><code>long difference1=time2-time1;</code><br>
  <code>long difference2=time4-time3;</code><br>
  <code>long difference3=time6-time5;</code></p>
  
  <p>Then i want addition of these three differences. like difference1+difference2+difference3.</p>