DWORD GetTickCount(void) |
The GetTickCount function retrieves the number of milliseconds that have elapsed since Windows was started.
This function has no parameters.
The return value specifies the number of milliseconds that have elapsed since Windows was started.
The internal timer will wrap around to zero if Windows is run continuously for approximately 49 days.
The GetTickCount function is identical to the GetCurrentTime function. Applications should use GetTickCount, because its name matches more closely with what the function does.
The following example calls GetTickCount to determine the number of milliseconds that Windows has been running, converts the value into seconds, and displays the value in a message box:
char szBuf[255];
sprintf(szBuf, "Windows has been running for %lu seconds\n",
GetTickCount() / 1000L);
MessageBox(hwnd, szBuf, "", MB_OK);