@SuppressWarnings("GoodTime") // should accept a java.time.Duration
  public boolean enterInterruptibly(long time, TimeUnit unit) throws InterruptedException {
    return lock.tryLock(time, unit);
  }
@SuppressWarnings("GoodTime") 
  public boolean enterInterruptibly(long time, TimeUnit unit) throws InterruptedException {
    return lock.tryLock(time, unit);
  }
@ SuppressWarnings ( "GoodTime" ) // should accept a java.time.Duration public boolean enterInterruptibly ( long time , TimeUnit unit ) throws InterruptedException { return lock . tryLock ( time , unit ) ; }
Enters this monitor. Blocks at most the given time, and may be interrupted.

@return whether the monitor was entered
@throws InterruptedException if interrupted while waiting
Enters this monitor . Blocks at most the given time and may be interrupted .