GetMessageQueueReadyTimeStamp

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function retrieves the time at which a specified thread was last ready to process a message.


DWORD WINAPI GetMessageQueueReadyTimeStamp(
  HWND hWnd
);

hWnd

[in] Handle to a window that is owned by the thread you want to query.

The time, expressed as the number of milliseconds that have elapsed since the operating system was started, at which the thread was last ready to process a message. If the thread is idle and waiting to receive a message to process, the return value is the same as the return value of the GetTickCount function. Zero indicates failure. To get extended error information, call GetLastError.

When a thread calls the GetMessage function on the message queue for the thread, the thread enters the blocked state until a message is ready to process. When a message becomes available in the message queue, the thread leaves the blocked state and receives a time stamp that is obtained by calling GetTickCount. The time stamp resets to the current time only when the thread returns to the idle state.

To determine the amount of time that has elapsed since a thread was last ready to process a message, call GetTickCount just before or just after calling GetMessageQueueReadyTimeStamp. If the return value of GetMessageQueueReadyTimeStamp is not zero, the difference between the return values from GetMessageQueueReadyTimeStamp and GetTickCount approximates the length of time that the thread has taken to be ready to process the next message.

Headerwindows.h
Librarycoredll.lib
Windows Embedded CEWindows CE .NET 4.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show: