Util.GetTickCount

Top  Previous  Next

 

Syntax

function Util.GetTickCount(): positive-integer

 

Alternative Names

ibec_GetTickCount

 

Description

Retrieves the number of milliseconds that have elapsed since the system was started, up to 49.7 days.

 

The Return Value is the current tick count.

 

See Also

Util.GetTickDiff
Util.DecodeTicks

 

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