SRL Archive - OSR Help

Help a noob please!


Darcy_Oner

2013-04-06 02:56:50

Ok guys im trying to use the MarkTime function, how do i reset the timer/counter?

Justin

2013-04-06 03:06:33

Just re-mark it, MarkTimer(int) or set the int to 0.

YoHoJo

2013-04-06 03:46:37


program ResetTime;

{$i SRL/SRL.simba}

Var Timer: Integer;

begin
MarkTime(Timer);
Repeat
Wait(1000);
WriteLn('Timer is at ' + IntToStr(TimeFromMark(Timer)) + ' miliseconds');
If TimeFromMark(Timer) > 5000 Then
Begin
Writeln('5 seconds have passed, resetting');
MarkTime(Timer);
End;
Until(False)
end.

:) Example