@Test public void testpollWithPredicate() { long now1 = System.currentTimeMillis(); boolean returnValue = PollUtils.poll((c) -> System.currentTimeMillis() >= now1 + c, 100, 600, 400); Assert.assertTrue(returnValue); long now2 = System.currentTimeMillis(); Assert.assertTrue(now2 - now1 >= 350); }
public static boolean poll(BooleanSupplier cond, long periodMs, long timeoutMs) { return poll((n) -> cond.getAsBoolean(), periodMs, timeoutMs, null); }
PollUtils { public static boolean poll(BooleanSupplier cond, long periodMs, long timeoutMs) { return poll((n) -> cond.getAsBoolean(), periodMs, timeoutMs, null); } }
PollUtils { public static boolean poll(BooleanSupplier cond, long periodMs, long timeoutMs) { return poll((n) -> cond.getAsBoolean(), periodMs, timeoutMs, null); }  }
PollUtils { public static boolean poll(BooleanSupplier cond, long periodMs, long timeoutMs) { return poll((n) -> cond.getAsBoolean(), periodMs, timeoutMs, null); }  static boolean poll(BooleanSupplier cond, long periodMs, long timeoutMs); static boolean poll(InterruptablePredicate<T> cond, long periodMs, long timeoutMs, T arg); static Optional<T> poll(InterruptableSupplier<T> interruptableSupplier, InterruptablePredicate<T> cond,
      long periodMs, long timeoutMs); }
PollUtils { public static boolean poll(BooleanSupplier cond, long periodMs, long timeoutMs) { return poll((n) -> cond.getAsBoolean(), periodMs, timeoutMs, null); }  static boolean poll(BooleanSupplier cond, long periodMs, long timeoutMs); static boolean poll(InterruptablePredicate<T> cond, long periodMs, long timeoutMs, T arg); static Optional<T> poll(InterruptableSupplier<T> interruptableSupplier, InterruptablePredicate<T> cond,
      long periodMs, long timeoutMs);  }