static long calculateDeadlineMs(final Timer timer) {
        requireNonNull(timer);
        return calculateDeadlineMs(timer.currentTimeMs(), timer.remainingMs());
    }
Calculate the deadline timestamp based on {@link Timer#currentTimeMs()} and {@link Timer#remainingMs()}.

@param timer Timer

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