Permalink
Browse files

Simulate slow network if debugging.

  • Loading branch information...
1 parent e6a27b4 commit 71c01120b299f0ce6b909f6b967f3b5d643c52b6 @andjo committed Mar 27, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/com/turf/xml/ParseXML.java
View
12 src/com/turf/xml/ParseXML.java
@@ -24,6 +24,18 @@
public static CharStats parseXML(String email)
{
+ if (TurfWidget.DEBUG) {
+ Log.d(TurfWidget.DEBUG_STRING, "parseXML");
+ // Simulating somewhat slow network.
+ try {
+ Log.d(TurfWidget.DEBUG_STRING, "sleeping..");
+ Thread.sleep(3000);
+ Log.d(TurfWidget.DEBUG_STRING, "..done");
+ }
+ catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
try {
URL url = new URL(URL_ADRESS + email);

0 comments on commit 71c0112

Please sign in to comment.