c.setProperty("options", "Yes, it's good; No, it sucks; I don't know");
c.setReplyTimeout(10000); //10 seconds
new Thread(new Runnable() {
public void run() {
VariousSensorsGui guiHook = (VariousSensorsGui) gui;
Command reply = send(c);
if (reply != null) {
String userInput = reply.getProperty("result");
if (userInput != null) {
guiHook.updateDescription("The reply to the test question is " + userInput);
} else {
guiHook.updateDescription("The user has not responded to the question within the given time");
}
} else {
guiHook.updateDescription("Unreceived reply within given time (10 seconds)");
}
}
}).start();
}