@Override
    public String toString() {
        return "ResignedState(" +
            "localId=" + localId +
            ", epoch=" + epoch +
            ", voters=" + voters +
            ", electionTimeoutMs=" + electionTimeoutMs +
            ", unackedVoters=" + unackedVoters +
            ", preferredSuccessors=" + preferredSuccessors +
            ')';
    }
Check the time remaining until the timeout expires.

@param currentTimeMs current time in milliseconds
@return the duration in milliseconds from the current time before the timeout expires
raft/src/main/java/org/apache/kafka/raft/ResignedState.java