How to get high resolution timing info

We know that we can use GetTickCount to get timing info but the resolution of this API is limited to about 10 milliseconds, see MSDN: http://msdn.microsoft.com/en-us/library/ms724408(VS.85).aspx The resolution of the GetTickCount function is limited to the resolution of the system timer, which is typically in the range of 10 milliseconds to 16 milliseconds. To get…

0

C++ tips: AddVectoredExceptionHandler, AddVectoredContinueHandler and SetUnhandledExceptionFilter

I write below code to verify the behaviors of AddVectoredExceptionHandler, AddVectoredContinueHandler and SetUnhandledExceptionFilter: #include “stdafx.h” LONG WINAPI MyVectorContinueHandler(PEXCEPTION_POINTERS p){ printf(“in my vectored continue handler\r\n”); return EXCEPTION_CONTINUE_SEARCH;} LONG WINAPI MyVectorExceptionFilter(PEXCEPTION_POINTERS p){ printf(“in my vectored exception filter\r\n”); return EXCEPTION_CONTINUE_SEARCH;} LONG WINAPI MyUnhandledExceptionFilter(PEXCEPTION_POINTERS p){ printf(“in my unhandled excepiton filter\r\n”); return EXCEPTION_CONTINUE_SEARCH;} LONG MyExceptFilter(){ printf(“in my filter\r\n”); return EXCEPTION_CONTINUE_SEARCH;} int _tmain(int argc, _TCHAR* argv[]){ LPTOP_LEVEL_EXCEPTION_FILTER pOriginalFilter = SetUnhandledExceptionFilter(MyUnhandledExceptionFilter);  AddVectoredExceptionHandler(1,MyVectorExceptionFilter); AddVectoredContinueHandler(1,MyVectorContinueHandler);…

2