public void setDuration(long duration) {
        this.duration = duration;
        persistLong(duration);
        notifyDependencyChange(shouldDisableDependents());
        notifyChanged();
    }
Set the current duration.

@param duration duration in milliseconds
android/third_party/time-duration-picker/src/main/java/mobi/upod/timedurationpicker/TimeDurationPickerPreference.java