Question and Answer Database FAQ4591C.txt — SubMilli-Second Timer Category:Windows API Platform:All-32Bit Product:All-32Bit, Question: Is there anyway to do a sub MilliSecond timer with WinNT/95? Answer: Use QueryPerformanceCounter. For Example, LONGLONG counter; LARGE_INTEGER x; QueryPerformanceCounter(&x); counter = x.QuadPart; The 'QuadPart' member is a LONGLONG, which is typedef'd as __int64, as so we can readily convert LARGE_INTEGER to __int64 variables, safely and portably. Actually, the most portable code would use LONGLONG, since not all compilers may support the __int64 keyword (and have Win32 headers that typedef LONGLONG to some other type). 4/29/99 3:16:34 PM
Last Modified: 01-SEP-99