Create timeouts from java without using durations

This commit is contained in:
Peter Vlugter 2011-12-22 12:12:41 +13:00
parent 4661145881
commit 9b58ecece7
4 changed files with 8 additions and 11 deletions

View file

@ -23,7 +23,6 @@ import akka.japi.Function;
//#import-function
//#import-timeout
import akka.util.Duration;
import akka.util.Timeout;
import static java.util.concurrent.TimeUnit.SECONDS;
//#import-timeout
@ -86,7 +85,7 @@ public class AgentDocTest {
//#send-off
//#read-await
Integer result = agent.await(new Timeout(Duration.create(5, SECONDS)));
Integer result = agent.await(new Timeout(5, SECONDS));
//#read-await
assertEquals(result, new Integer(14));