본문 바로가기

Programming/API

timeGetTime & GetTickCount

timeGetTime

The timeGetTime function retrieves the system time, in milliseconds. The system time is the time elapsed since Windows was started.

DWORD timeGetTime(VOID); 

Parameters

This function does not take parameters.

Return Values

Returns the system time, in milliseconds.


GetTickCount

The GetTickCount function retrieves the number of milliseconds that have elapsed since the system was started. It is limited to the resolution of the system timer. To obtain the system timer resolution, use the GetSystemTimeAdjustment function.

DWORD GetTickCount(void);

Parameters

This function has no parameters.

Return Values

The return value is the number of milliseconds that have elapsed since the system was started.

둘다 윈도우 시간을 리턴하는 함수다. timeGetTime 이 GetTickCount 보다는 정확하다고 한다.

뭐 더 정확하게 하고 싶다면 앞선 프레임에서 선보인 cpu 주파수를 이용한 함수를 이용하면

매우 정확도가 높을 것이다

'Programming > API' 카테고리의 다른 글

GetMessage vs. PeekMessage  (0) 2009.11.06
SendMessage vs. PostMessage  (0) 2009.11.06
프레임 출력  (0) 2009.11.06
기본 세팅 파일  (0) 2009.11.06