public void setDuration(long millis) {
            duration = millis;
            setDuration(
                    TimeDurationUtil.hoursOf(millis),
                    timeUnits == MM_SS ? TimeDurationUtil.minutesOf(millis) : TimeDurationUtil.minutesInHourOf(millis),
                    TimeDurationUtil.secondsInMinuteOf(millis));
        }
Encapsulates the digit input logic and text to duration conversion logic.
android/third_party/time-duration-picker/src/main/java/mobi/upod/timedurationpicker/TimeDurationPicker.java