Util.GetTicksDurationString |
Top Previous Next |
Syntax function Util.GetTicksDurationString(Milliseconds: positive-integer): string
Description Formats a string for the given duration value in Milliseconds, as returned from Util.GetTickCount or Util.GetTickDiff.
The Return Value is the duration formatted as hh:mm:ss.ms, eg: "02:10:02.346"
See Also
Example execute UDSBlock as begin /* retrieves the number of milliseconds that have elapsed since the system was started, up to 49.7 days. */ StartTicks = Util.GetTickCount();
GUI.Showmessage('This computer has been running for ' || Util.GetTicksDurationString(StartTicks));
EndTicks = Util.GetTickCount();
DiffTicks = Util.GetTickDiff(StartTicks, EndTicks);
DiffTicks2 = Util.GetTickDiff(StartTicks);
h = 0; n = 0; s = 0; ms = 0; Util.DecodeTicks(DiffTicks, h, n, s, ms);
duration_str = Util.GetDurationString(h, n, s, ms);
GUI.ShowMessage('Script started at ' || StartTicks || ', ended after ' || DiffTicks || ' milliseconds, that''s a duration of ' || duration_str); end |