in reply to Help to infinite loop
instead of sleeping, and calling a sub to stop the loop, write the loop like this (pseudocode):
while (!alarmed) { yourWorkHere(); alarm("you have 60 sec. to press a key to stop this loop"); if (keyPressed) { alarmed=1; } }
|
|---|