protected Duration restSplit() {
        Duration restLong = intervals.findGap(period, Rest.SPLIT_LONG.getValue());
        Duration restShort = intervals.findGap(period, Rest.SPLIT_SHORT.getValue());

        if (restLong == null) {
            if (restShort == null) {
                return null;
            } else {
                return Utils.safeMinus(Rest.SPLIT_LONG.getValue(), intervals.lastGap());
            }
        } else {
            if (restShort == null) {
                return Utils.safeMinus(Rest.SPLIT_SHORT.getValue(), intervals.lastGap());
            } else {
                return new Duration(0);
            }
        }
    }