INF: GetCurrentTime and GetTickCount Functions Identical

ID Number: Q45702

2.10 3.00 3.10

WINDOWS

Summary:

The GetCurrentTime and GetTickCount functions are identical. Each

returns the number of milliseconds (+/- 55 milliseconds) since the

user started Windows, and the return value of each function is

declared to be a DWORD.

The following code demonstrates these two functions:

DWORD dwCurrTime;

DWORD dwTickCount;

char szCurrTime[50];

dwCurrTime = GetCurrentTime();

dwTickCount = GetTickCount();

sprintf(szCurrTime, "Current time = %lu\nTick count = %lu",

dwCurrTime, dwTickCount);

MessageBox(hWnd, szCurrTime, "Times", MB_OK);

Additional reference words: 2.10 3.00 3.10 2.x SR# G890605-19712