public long getDuration() {
            final int hours = Integer.parseInt(getHoursString());
            final int minutes = Integer.parseInt(getMinutesString());
            final int seconds = Integer.parseInt(getSecondsString());
            return TimeDurationUtil.durationOf(hours, minutes, seconds);
        }
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