public boolean attempt(long msecs) throws InterruptedException {
        // log.debug("attempt()::" + Thread.currentThread().toString());
        if (Thread.interrupted()) {
            throw new InterruptedException();
        }
        Thread caller = Thread.currentThread();
        synchronized (this) {
            if (caller == m_Owner) {
                ++m_Holds;
                return true;
            } else if (m_Owner == null) {
                m_Owner = caller;
                m_Holds = 1;
                return true;
            } else if (msecs <= 0) {
                return false;
            } else {
                long waitTime = msecs;
                long start = System.currentTimeMillis();
                try {
                    for (;;) {
                        wait(waitTime);
                        if (caller == m_Owner) {
                            ++m_Holds;
                            return true;
                        } else if (m_Owner == null) {
                            m_Owner = caller;
                            m_Holds = 1;
                            return true;
                        } else {
                            waitTime = msecs - (System.currentTimeMillis() - start);
                            if (waitTime <= 0) {
                                return false;
                            }
                        }
                    }
                } catch (InterruptedException ex) {
                    notify();
                    throw ex;
                }
            }
        }
    }// attempt