The TickCount Function
The TickCount Function
The Event Manager includes the TickCount function, which returns the
total number of ticks (sixtieths of a second) that have elapsed since the system
last started up. The tick count (maintained in the Ticks global variable) is
incremented during the vertical retrace interrupt. Because this interrupt can
sometimes be disabled, the value TickCount returns may not be exact.
Using the TickCount function, you can write code that mimics some of the
capabilities of the Time Manager. For example, your application can cause a
routine to be executed at some time in the future by simply waiting until the
appropriate time and then executing the desired routine. Your application can
delay its own operation by repeatedly calling TickCount until Ticks exceeds a
specified threshold value. Similarly, your application can obtain elapsed-time
information by reading the current tick count at the beginning and at the end of
the routine that you want to time.