Time¶
Time related methods
srl.MsToTime¶
function TSRL.MsToTime(const MS: UInt64; const Format: TTimeFormat): String; constref;
Converts milliseconds to a string following the given time-format.
srl.TimeRunning¶
function TSRL.TimeRunning(TheType: TTimeFormat = Time_Formal_Long): String; constref;
Returns time the script has been running as a string with the given time-format.
TCountDown¶
A neat and simple timer type.
Example:
myTimer.Init(3000); //3000ms
while not myTimer.IsFinished() do
{do something};
myTimer.Restart(Random(-200,200)); //3000 +/- 200ms
while not myTimer.IsFinished() do
{do something};
TStopWatch¶
A neat and simple stopwatch type.
Example:
var StopWatch: TStopWatch;
StopWatch.Start();
Wait(1000);
WriteLn(StopWatch.ElapsedTime()); // ~1000