Fixing small issue with sleep time in Actor example. (#187)

This commit is contained in:
Artur Souza 2020-01-31 14:27:24 -08:00 committed by GitHub
parent c487294143
commit 187a22725c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ public class DemoActorClient {
try {
// Waits for up to 1 second.
Thread.sleep((long) Math.rint(1000));
Thread.sleep((long) (1000 * Math.random()));
} catch (InterruptedException e) {
// We have been interrupted, so we set the interrupted flag to exit gracefully.
Thread.currentThread().interrupt();

View File

@ -148,7 +148,7 @@ public class DemoActorClient {
try {
// Waits for up to 1 second.
Thread.sleep((long) Math.rint(1000));
Thread.sleep((long) (1000 * Math.random()));
} catch (InterruptedException e) {
// We have been interrupted, so we set the interrupted flag to exit gracefully.
Thread.currentThread().interrupt();