Thread.sleep in Canvas
<p>I am not able to display the rectangles after a certain delay in code. 
Here is what I am doing</p>

<p>DashPathEffect dashPath =new DashPathEffect(new float[]{1,0}, 1);</p>

<pre><code>        paint.setPathEffect(dashPath);
        paint.setStrokeWidth(300);
        final int  size =300;
</code></pre>

<p>canvas.drawLine(0, size ,100 , size, paint);</p>

<p>try {</p>

<pre><code>            Thread.sleep(4000, 0);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
</code></pre>

<p>canvas.drawLine(110, size ,200 , size, paint);</p>

<hr>

<p>I am not able to notice any delay between these two rectagles in the mobile screen. Both appear at the same time. All I am trying to do is, draw the rectangles one after other with some delay in between. What this code is rather doing is, waiting for 4 seconds and then displaying both rectangles at same time.  Thank you. </p>
