A Java example show you how to print the elapsed time in days, hours, minutes and seconds format.

Date end = ...
Date start = ...
long diff = end.getTime() - start.getTime();
long sec = (diff / 1000) % 60;
long min = (diff / (1000 * 60)) % 60;
long hour = (diff / (1000 * 60 * 60)) % 60;
long days = (diff / (1000 * 60 * 60 * 24)) % 60;
		
System.out.println("Days: " + days + " - Hour: " + hour + " - Min: " + min + " - Sec: " + sec);

ciao