Date endTime = activity.getEndTime();
Date startTime = new Date();
Calendar startCalendar = Calendar.getInstance();
startCalendar.setTime(startTime);
Calendar endCalendar = Calendar.getInstance();
endCalendar.setTime(endTime);
Long endSecond = endCalendar.getTimeInMillis();
Long startSecond = startCalendar.getTimeInMillis();
Long balance = endSecond-startSecond;
Integer s_day = 60*60*24*1000;
Integer s_hour = 60*60*1000;
Integer s_min = 60*1000;
Long day = balance/s_day;
Long hour = (balance-day*s_day)/s_hour;
Long min = (balance-day*s_day-hour*s_hour)/s_min;
Long sec = (balance-day*s_day-hour*s_hour-min*s_min)/1000;