the Sleep function just causes the script to hang for the duration specified by Sleep. Sleep 1000 causes the script to hang for 1000 ms before continuing.<br>you could accomplish what you're trying to do using Clock.Read
. that is, if you trust your computer's clock, i guess.<br>Do<br> Serial.WriteString ...<br>While (Clock.Read - LoopStartTime) < LoopDuration<br><br><div class="gmail_quote">On Dec 11, 2007 1:00 PM, Nikos Konstantinou <
<a href="mailto:nkonstantinou@gmail.com">nkonstantinou@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Yes, I do need to repeat
Serial.WriteString as many times as possible within the span of one second (or any other time period). What does the sleep function do?</div>
<div> </div>
<div>Cheers,</div><font color="#888888">
<div> </div>
<div>N<br><br></div></font><div><div></div><div class="Wj3C7c">
<div class="gmail_quote">On Dec 11, 2007 5:48 PM, ben robinson <<a href="mailto:baltimore.ben@gmail.com" target="_blank">baltimore.ben@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">i'm not sure i understand.<br>could you simply Serial.WriteString a single time, then Sleep 1000? or do you need to repeatedly call
Serial.WriteString as many times as possible within the span of one second?<br><br>ben
<div>
<div></div>
<div><br><br>
<div class="gmail_quote">On Dec 11, 2007 12:37 PM, Nikos Konstantinou <<a href="mailto:nkonstantinou@gmail.com" target="_blank">nkonstantinou@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Dear E-Prime users,</div>
<div> </div>
<div>does anybody know an eprime function equivalent to the MATLAB tic toc functions? </div>
<div> </div>
<div>I need to create a loop that lasts for 1 second while the Serial.WriteString method is called and don't know how!</div>
<div> </div>
<div>Below is a code that worked for me but I think there's a better way:</div>
<div> </div>
<div>While i <161<br> Serial.WriteString EnableRC<br> i = i +1<br>Wend<br></div>
<div> </div>
<div>I would appreciate any responses.</div>
<div> </div>
<div>Best</div>
<div> </div>
<div>Nikos</div><br><br></blockquote></div><br><br></div></div><br><br></blockquote></div><br><br>
<br>
</div></div></blockquote></div><br><br>
--~--~---------~--~----~------------~-------~--~----~<br>
You received this message because you are subscribed to the Google Groups "E-Prime" group. <br> To post to this group, send email to e-prime@googlegroups.com <br> To unsubscribe from this group, send email to e-prime-unsubscribe@googlegroups.com <br> For more options, visit this group at http://groups.google.com/group/e-prime?hl=en <br> -~----------~----~----~----~------~----~------~--~---<br>
<br>