Util.DecodeTicks |
Top Previous Next |
Syntax function Util.DecodeTicks(Ticks: positive-integer; var Hours: integer; var Minutes: integer; var Seconds: integer; var Milliseconds: integer); integer
Description Decodes the given millisecond value of Ticks as a duration, into separate Hours, Minutes, Seconds and Milliseconds.
The Return Value is 0.
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 |