title: How to set a execution limit time to a thread?
body: <p>I'm creating a connection thread, and I need to kill her if exceed a predetermined execution limit time.</p>
  
  <p>Example: If the connection attempt time exceed 5 seconds, interrupt the Connection Thread.</p>
  
  <p>How can I implement this? :(</p>
  
  <p>I'm using the Android SDK (java).</p>
  
  <p>Thanks</p>