Topic Path: Symbol Reference > Functions > Ticks Function
ContentsIndexHome
PreviousUpNext
Ticks Function

Retrieves the number of milliseconds since the computer was started.

File
function Ticks: Cardinal;

Cardinal - Number of milliseconds (ticks).

Ticks is a Cardinal function used to retrieve the number of milliseconds since the computer was started. Ticks is often used when calculating the response times for components in the Indy library, such as TIdEcho and TIdTime

Ticks encapsulates the platform-specific calls necessary to provide a high resolution timer for fixed duration events. 

 

On the Windows and .Net platforms, the API functions QueryPerformanceFrequency and QueryPerformanceCounter are used to initialize and calculate the return value. On Windows platforms that do not implement the API functions, the GetTickCount function in Windows.pas is used. 

 

On the Linux platform, Ticks uses the gettimeofday library function clock adjusted to thousandths of CLOCKS_PER_SECs.

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.