Skip to content

Commit

Permalink
added hack to delay responses, for quick ai's
Browse files Browse the repository at this point in the history
  • Loading branch information
peterschriever committed Apr 15, 2017
1 parent 7eb2b39 commit 9d22b4c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ public void update(Observable observable, Object o) {

String responseString = ((String) o);

System.out.println("InputStreamObserver notified: " + responseString);
// System.out.println("InputStreamObserver notified: " + responseString);
Response response = parseResponse(responseString);
// HACK: slow down the responses so that the application has appropriate time to update
try {
Thread.sleep(300);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (response != null) {
response.executeCallback();
}
Expand Down

0 comments on commit 9d22b4c

Please sign in to comment.