private void updateNextClock(final PseudoTCPBase tcp,final Object lock){
  try {
    long now=PseudoTCPBase.now();
synchronized (tcp) {
      tcp.notifyClock(now);
    }
    long interval;
synchronized (tcp) {
      interval=tcp.getNextClock(PseudoTCPBase.now());
    }
    if (logger.isLoggable(Level.FINEST)) {
      logger.log(Level.FINEST,tcp.debugName + " CLOCK sleep for " + interval);
    }
    if (interval < 0) {
      if (interval == -1) {
        interval=1000;
      }
 else {
        return;
      }
    }
synchronized (lock) {
      lock.wait(interval);
    }
  }
 catch (  InterruptedException ex) {
  }
}

private void updateNextClock ( final PseudoTCPBase tcp , final Object lock ) { try { long now = PseudoTCPBase . now ( ) ; synchronized ( tcp ) { tcp . notifyClock ( now ) ; } long interval ; synchronized ( tcp ) { interval = tcp . getNextClock ( PseudoTCPBase . now ( ) ) ; } if ( logger . isLoggable ( Level . FINEST ) ) { logger . log ( Level . FINEST , tcp . debugName + " CLOCK sleep for " + interval ) ; } if ( interval < 0 ) { if ( interval == - 1 ) { interval = 1000 ; } else { return ; } } synchronized ( lock ) { lock . wait ( interval ) ; } } catch ( InterruptedException ex ) { } }
method handles time update for pseudotcp logic class
