public long roundTripTime() throws InterruptedException {
  latch.await();
  return received - sent;
}

public long roundTripTime ( ) throws InterruptedException { latch . await ( ) ; return received - sent ; }
returns the round trip time for this ping in nanoseconds , waiting for the response to arrive if necessary . returns - 1 if the response was cancelled .
