title: How to make an Android program 'wait'
body: <p>I want to cause my program to pause for a certain number of milliseconds, how exactly would I do this?</p>
  
  <p>I have found different ways such as <code>Thread.sleep( time )</code>, but I don't think that is what I need. I just want to have my code pause at a certain line for x milliseconds. Any ideas would be greatly appreciated.</p>
  
  <p>This is the original code in C...</p>
  
  <pre><code>extern void delay(UInt32 wait){
      UInt32 ticks;
      UInt32  pause;
  
      ticks = TimGetTicks();
      //use = ticks + (wait/4);
      pause = ticks + (wait);
      while(ticks &lt; pause)
          ticks = TimGetTicks();
  }
  </code></pre>
  
  <p>wait is an amount of milliseconds</p>