public static String formatTime(Long time) {
		if (time == null) {
			return "N/A";
		}
		long secondInMillis = 1000;
		long minuteInMillis = secondInMillis * 60;
		long hourInMillis = minuteInMillis * 60;
		long dayInMillis = hourInMillis * 24;

		long elapsedDays = time / dayInMillis;
		time = time % dayInMillis;
		long elapsedHours = time / hourInMillis;
		time = time % hourInMillis;
		long elapsedMinutes = time / minuteInMillis;
		time = time % minuteInMillis;
		long elapsedSeconds = time / secondInMillis;

		if (elapsedDays > 0) {
			return String.format("%02d:%02d:%02d:%02d", elapsedDays, elapsedHours, elapsedMinutes, elapsedSeconds);
		} else if (elapsedHours > 0) {
			return String.format("%02d:%02d:%02d", elapsedHours, elapsedMinutes, elapsedSeconds);
		} else {
			return String.format("%02d:%02d", elapsedMinutes, elapsedSeconds);
		}
	}