Threads { public static void sleepRoughly(Duration duration) { long sleepTime = sleepTime(duration); LOGGER.debug("sleep {} ms", sleepTime); try { Thread.sleep(sleepTime); } catch (InterruptedException e) { LOGGER.debug("sleep is interrupted", e); } }  static void sleepRoughly(Duration duration);  }
@Test void sleepRoughly() { Threads.sleepRoughly(Duration.ZERO); }