This method of the Command class sets a value that indicates, in seconds, how long to wait for a command to execute.
public void setCommandTimeout(int timeout);