private static long toSafeNanos(long time, TimeUnit unit) {
    """
	Returns unit.toNanos(time), additionally ensuring the returned value is not at risk of
	overflowing or underflowing, by bounding the value between 0 and (Long.MAX_VALUE / 4) * 3.
	Actually waiting for more than 219 years is not supported!
    """
    long timeoutNanos = unit.toNanos(time);
    return (timeoutNanos <= 0L)
        ? 0L
        : (timeoutNanos > (Long.MAX_VALUE / 4) * 3) ? (Long.MAX_VALUE / 4) * 3 : timeoutNanos;
  }
private static long toSafeNanos(long time, TimeUnit unit) {
    long timeoutNanos = unit.toNanos(time);
    return (timeoutNanos <= 0L)
        ? 0L
        : (timeoutNanos > (Long.MAX_VALUE / 4) * 3) ? (Long.MAX_VALUE / 4) * 3 : timeoutNanos;
  }
private static long toSafeNanos ( long time , TimeUnit unit ) { long timeoutNanos = unit . toNanos ( time ) ; return ( timeoutNanos <= 0L ) ? 0L : ( timeoutNanos > ( Long . MAX_VALUE / 4 ) * 3 ) ? ( Long . MAX_VALUE / 4 ) * 3 : timeoutNanos ; }
Returns unit.toNanos(time), additionally ensuring the returned value is not at risk of
overflowing or underflowing, by bounding the value between 0 and (Long.MAX_VALUE / 4) * 3.
Actually waiting for more than 219 years is not supported!
Returns unit . toNanos ( time ) additionally ensuring the returned value is not at risk of overflowing or underflowing by bounding the value between 0 and ( Long . MAX_VALUE / 4 ) * 3 . Actually waiting for more than 219 years is not supported!