HKbotz
2014-12-31 06:23:43
So I was writing a script that uses TTimeMarker and noticed that it was failing because it thought it waited for a certain amount of time, but really it had been like 2 seconds, I think I had it set to wait for 10. Anyway it was clearly not waiting even close to long enough.
Looking closer I realized when I called timer.getTime() it was spitting out some really big number, I am just curious as to why this is happening and how to get around it.
I tried adding timer.reset() before calling timer.getTime() but it didn't make any difference, I still get a really big number.
Does the timer have to be started before .getTime() works properly or is there something else I'm missing?
Any help is appreciated :)
Ex.
Output:
Looking closer I realized when I called timer.getTime() it was spitting out some really big number, I am just curious as to why this is happening and how to get around it.
I tried adding timer.reset() before calling timer.getTime() but it didn't make any difference, I still get a really big number.
Does the timer have to be started before .getTime() works properly or is there something else I'm missing?
Any help is appreciated :)
Ex.
program new;
{$i srl-6/srl.simba}
var
timer: TTimeMarker;
begin
timer.reset();
writeln('timer.getTime(): ' + intToStr(timer.getTime()));
end.Output:
timer.getTime(): 282755836
Successfully executed.