Time
Time related methods
TTimeFormat
type TTimeFormat = (Time_Formal, Time_Short, Time_Abbrev, Time_Bare, Time_FStop, Time_Formal_Long);
Formats used when converting time to string.
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