Package org.linkedin.util.clock

Examples of org.linkedin.util.clock.Chronos


  public int waitFor(long timeout) throws InterruptedException, TimeoutException
  {
    if(_process == null)
      throw new IllegalStateException("you must call start first");

    Chronos c = new Chronos();
    _out.join(timeout);
    timeout -= c.tick();
    if (timeout <= 0)
      throw new TimeoutException("Wait timed out");
    _err.join(timeout);
    timeout -= c.tick();
    if (timeout <= 0)
      throw new TimeoutException("Wait timed out");
   
    // there is no timeout in this API, not much we can do here
    // waiting on the other two threads should give us some safety
View Full Code Here

TOP

Related Classes of org.linkedin.util.clock.Chronos

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.