public boolean await(int count, int timeout) {
            long t = TimeUnit.MILLISECONDS.toNanos(timeout);

            lock.lock();

            try {
                while (this.doneCount < count) {
                    if ((t = cond.awaitNanos(t)) <= 0) {
                        return false;
                    }
                }
            } catch (InterruptedException e) {
                return false;
            } finally {
                lock.unlock();
            }
    
            return true;
        }