<br><div class="gmail_quote">On Thu, Jul 16, 2009 at 6:34 PM, superpollo <span dir="ltr"><<a href="mailto:user@example.net">user@example.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hello.<br>
<br>
based upon previuos suggestions, i tried to write a program in which i would like to have a certain code fragment to execute only for a specified amount of time (say 3 seconds), then bail out.<br>
<br>
<snip> </blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
see? the while body ran for about 7 seconds... i bet it has to do with the fact that the timer does not control inner loops... any suggestion?<br>
<br>
</blockquote></div><br>I'm guessing it has to do with a sleep of 0.66 seconds x 10 times = sleep for 6.6 seconds, and then it checks for e.isSet().<br>
<br>
Best regards,<br>
<br clear="all">Ching-Yun "Xavier" Ho, Technical Artist<br><br>Contact Information<br>Mobile: (+61) 04 3335 4748<br>Skype ID: SpaXe85<br>Email: <a href="mailto:contact@xavierho.com">contact@xavierho.com</a><br>
Website: <a href="http://xavierho.com/">http://xavierho.com/</a><br><br>