@Override
    public void waitObject(Object obj, Supplier<Boolean> condition, long deadlineMs) throws InterruptedException {
        synchronized (obj) {
            while (true) {
                if (condition.get())
                    return;

                long currentTimeMs = milliseconds();
                if (currentTimeMs >= deadlineMs)
                    throw new TimeoutException("Condition not satisfied before deadline");

                obj.wait(deadlineMs - currentTimeMs);
            }
        }
    }
A time implementation that uses the system clock and sleep call. Use `Time.SYSTEM` instead of creating an instance
of this class.
clients/src/main/java/org/apache/kafka/common/utils/SystemTime.java