looks ok, but why do you have it wait 5 seconds in the beginning...what if you wanted to have it terminate after 2 seconds or something?
It also doesnt make too much sense to have the marktime in with the actual failsafe itself...it wont be too much of a failsafe if it is...
i suggest something more on the lines of:
SCAR Code:
Program New;
var Time: Integer;
function TimeOverIt(ms: integer): boolean; //By cut em2 it
begin
if (TimeFromMark(Time) > ms) then
begin
Result := True;
Writeln('The program will now terminate because it is taking too long.');
Exit;
end;
end;
begin
SetupSRL;
MarkTime(Time);
repeat
if(TimeOverIt(100000))then
begin
TerminateScript;
end else
DoSomething;
until(SomeCondition);
end.
So this way the marktime is called and then the script can move on until it has reached the TimeOverIt...
Hope that helps, and keep up the good work ;)