Hi Folks,<div><br></div><div>I've always done this:<div><br></div><div>now + 10::second => time later;</div><div><br></div><div>while (now < later) {</div><div>// do stuff...</div><div>}</div><div><br></div><div>
since, "time < time" resolves to either true or false, then the while() construct will work.</div><div><br></div><div>Mike<br><br><div class="gmail_quote">On Fri, Sep 24, 2010 at 1:57 PM, Tom Lieber <span dir="ltr"><<a href="mailto:tom@alltom.com">tom@alltom.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Fri, Sep 24, 2010 at 8:37 AM, Andrew C. Smith<br>
<<a href="mailto:andrewchristophersmith@gmail.com">andrewchristophersmith@gmail.com</a>> wrote:<br>
> Yeah, I guess one thing we didn't really mention is that the argument<br>
> has to be a true/false value. until(5::second) won't work because<br>
> 5::second will not evaluate to true nor false. I think that's the main<br>
> misconception.<br>
<br>
</div>Is that true? This works how I'd think it should:<br>
<br>
until(5::second) {<br>
<<< "won't happen" >>>;<br>
}<br>
<br>
do {<br>
<<< "hi" >>>;<br>
second => now;<br>
} until(5::second);<br>
<br>
while(5::second) {<br>
<<< "bye" >>>;<br>
second => now;<br>
}<br>
<font color="#888888"><br>
--<br>
Tom Lieber<br>
<a href="http://AllTom.com/" target="_blank">http://AllTom.com/</a><br>
<a href="http://favmusic.net/" target="_blank">http://favmusic.net/</a><br>
</font><div><div></div><div class="h5">_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://michaelclemow.com">http://michaelclemow.com</a><br><a href="http://semiotech.org">http://semiotech.org</a><br><br>
</div></div>