This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
bjornir90's profile picture

[Question] [Computercraft] Too long without yeilding

Started by bjornir90, 09 February 2013 - 06:03 PM
bjornir90 #1
Posted 09 February 2013 - 07:03 PM
Hello everyone !
I want to know how many time I have before the computer run into a "too long without yeilding"
I assume the computer won't yeild.
Thanks you for your time :)/>
Lyqyd #2
Posted 09 February 2013 - 07:28 PM
Just yield once in a while. It's about ten seconds, though. Why wouldn't you be yielding?
ChunLing #3
Posted 09 February 2013 - 08:51 PM
Generally, you want to yield pretty much instantly, or as often as possible, because while a program doesn't yield no other computers or turtles can do anything.
mibac138 #4
Posted 10 February 2013 - 01:32 AM
use

sleep(0)
;)/>
bjornir90 #5
Posted 10 February 2013 - 05:38 AM
I know that but I was having an idea about a program that secure somethings and to avoid crash I want to add a security to stop the program before the error :)/> Anyways, thanks you :)/>