Try the followingMS_TO_SLEEP = 10 * 1000; // sleep for 10 secondstry{Thread.sleep(MS_TO_SLEEP);}catch(InterruptedException e){Thread.currentThread().interrupt();}