@Test public void isTimeExceeded() throws Exception { long testDelta = 1000; long oldTime = System.currentTimeMillis() - testDelta; Assert.assertTrue(TimeoutTimer.isTimeExceeded(oldTime, testDelta * 0.5)); Assert.assertFalse(TimeoutTimer.isTimeExceeded(oldTime, testDelta * 2)); }
public static boolean isTimeExceeded(long startTime, double timeout) { return (startTime + timeout) < System.currentTimeMillis(); }
TimeoutTimer { public static boolean isTimeExceeded(long startTime, double timeout) { return (startTime + timeout) < System.currentTimeMillis(); } }
TimeoutTimer { public static boolean isTimeExceeded(long startTime, double timeout) { return (startTime + timeout) < System.currentTimeMillis(); } TimeoutTimer(double timeout); }
TimeoutTimer { public static boolean isTimeExceeded(long startTime, double timeout) { return (startTime + timeout) < System.currentTimeMillis(); } TimeoutTimer(double timeout); static boolean isTimeExceeded(long startTime, double timeout); static boolean isTimeExceeded(LocalDateTime startTime, long timeout); static boolean isTimeExceeded(LocalDateTime startTime, double timeout); synchronized void reset(); synchronized boolean timeIsExceeded(); }
TimeoutTimer { public static boolean isTimeExceeded(long startTime, double timeout) { return (startTime + timeout) < System.currentTimeMillis(); } TimeoutTimer(double timeout); static boolean isTimeExceeded(long startTime, double timeout); static boolean isTimeExceeded(LocalDateTime startTime, long timeout); static boolean isTimeExceeded(LocalDateTime startTime, double timeout); synchronized void reset(); synchronized boolean timeIsExceeded();  }