GetTickCount Function

Action

Retrieves the number of milliseconds that have elapsed since Windows was started. The function is limited to a resolution of about 25 milliseconds.

Include file

Kernel.bdh

Syntax

GetTickCount(): number;

Return value

number of milliseconds that have elapsed since Windows was started

Example

dcltrans
transaction TGetTickCount
var
nTickCount: number;
begin
nTickCount := GetTickCount();
write("Windows was started about "); write (nTickCount/60000);
write(" minutes ago.");
end TGetTickCount;

Output

Windows was started about 78 minutes ago.