wait or sleep or something
<p>A numerical time value (not shown here) is available to this method in real time, that could conceivably be used to place a temporary hold on the following stop from being carried out:</p>

<pre><code>public void stopRec(){
 audioRecord.stop();
  try {
   dos.close();
  } catch (IOException e) {
   e.printStackTrace();
 }
}
</code></pre>

<p>Let's say a time forward has commenced and we're now t=0.25 into the ellapsed count.  But user is moving to invoke the above <em>now</em>, and I want to prevent that underlying method from transpiring until t>0.5 into the count.</p>

<p>It's fine if the user wants to (and does) press the close button, go ahead, and I'll throw a wait message on screen that will say more or less "Fine, stopping...."  But the thing won't actually stop until >0.5 occurs behind the scenes.</p>

<p>How would a wait statement (I wouldn't imagine a loop would be good because of wasted CPU cycles) be used in the above scenario?  Thanks for any help.</p>
