code: public void timedJoin(Thread thread, long timeout)
           throws InterruptedException {
           if (timeout > 0) {
               long ms = toMillis(timeout);
               int ns = excessNanos(timeout, ms);
               thread.join(ms, ns);
           }
       }
docs: Perform a timed <tt>Thread.join</tt> using this time unit.
  This is a convenience method that converts time arguments into the
  form required by the <tt>Thread.join</tt> method.
  @param thread the thread to wait for
  @param timeout the maximum time to wait
  @throws InterruptedException if interrupted while waiting.
  @see java.lang.Thread#join(long, int)