String hours = getTimeInterval(new Date(),work.getStartTime());
public static String getTimeInterval(Date currentTime, Date firstTime) {
DecimalFormat decimalFormat = new DecimalFormat("00");
long diff = currentTime.getTime() - firstTime.getTime();//得到的差值
long hours = diff / (1000 * 60 * 60); //获取时
long minutes = (diff - hours * (1000 * 60 * 60)) / (1000 * 60); //获取分钟
long s = (diff / 1000 - hours * 60 * 60 - minutes * 60);//获取秒
String countTime = "" + decimalFormat.format(hours) + ":" + decimalFormat.format(minutes) + ":" + decimalFormat.format(s);
return countTime;
}