count up Progressbar without any threads
<p>how can i count up Progressbar and freeze any thing else simply count up to 10 sec (update every sec).</p>

<pre><code>ProgressBar PB;
index=0;
while(index&lt;10)

   {
     /*************  wait(one sec)/*********/
     PB.setProgress(index);
     index++;
   }
</code></pre>

<p>can any body tell me what this code do</p>

<pre><code>while(index&lt;10)
{

    android.os.SystemClock.sleep(1000);//sleep please here one sec
    PB.setprogressbar(index);         //no i sleep 10 sec and then  index=10!!!!
        index++;
}
</code></pre>

<p>i will no't use threads,</p>
