 <p>I use it this way:</p> <p>So it is not necessary to wait the specific time to end.</p> <pre><code>public void run(){ try { //do something try{Thread.sleep(3000);}catch(Exception e){} //do something }catch(Exception e){} } </code></pre>