public static Duration available(Duration maximum, Duration current) {
        if (current.isLongerThan(maximum)) {
            return new Duration(0);
        } else {
            return maximum.minus(current);
        }
    }