delay
()
| 617 | /*** delay ***/ |
| 618 | |
| 619 | @Test |
| 620 | public void delay() throws CheckedFutureException { |
| 621 | long delay = 10; |
| 622 | long start = System.currentTimeMillis(); |
| 623 | Future.delay(Duration.ofMillis(delay), scheduler).get(Duration.ofMillis(200)); |
| 624 | assertTrue(System.currentTimeMillis() - start >= delay); |
| 625 | } |
| 626 | |
| 627 | /*** within ***/ |
| 628 |