static long calculateDeadlineMs(final Time time, final Duration duration) {
        return calculateDeadlineMs(requireNonNull(time).milliseconds(), requireNonNull(duration).toMillis());
    }
Calculate the deadline timestamp based on {@link Timer#currentTimeMs()} and {@link Duration#toMillis()}.

@param time     Time
@param duration Duration

@return Absolute time by which event should be completed
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/CompletableEvent.java