This function returns the message time for the last message retrieved by the WinGetMsg or WinPeekMsg functions from the current message queue.
#define INCL_WINMESSAGEMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle. */ ULONG ulTime; /* Time in milliseconds. */ ulTime = WinQueryMsgTime(hab);