title: Compare only the time portion of two dates, ignoring the date part
body: <p>What's a good method to, given two Date objects, compare the difference between their time portion only, completely ignoring Year, Month and Day?</p>
  
  <p>It's quite the opposite of <a href="https://stackoverflow.com/questions/1439779/how-to-compare-two-dates-without-the-time-portion">this question</a>.</p>
  
  <p><strong>UPDATE:</strong> Here's the final code for future reference:</p>
  
  <pre><code>private long differenceBetween(Date currentTime, Date timeToRun)
  {
      Calendar currentCal = Calendar.getInstance();
      currentCal.setTime(currentTime);
  
      Calendar runCal = Calendar.getInstance();
      runCal.setTime(timeToRun);
      runCal.set(Calendar.DAY_OF_MONTH, currentCal.get(Calendar.DAY_OF_MONTH));
      runCal.set(Calendar.MONTH, currentCal.get(Calendar.MONTH));
      runCal.set(Calendar.YEAR, currentCal.get(Calendar.YEAR));
  
      return currentCal.getTimeInMillis() - runCal.getTimeInMillis();
  }
  </code></pre>