远程桌面优化
This commit is contained in:
@@ -26,11 +26,8 @@
|
||||
#include <afxwin.h> // MFC <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD><EFBFBD><D7BC><EFBFBD><EFBFBD>
|
||||
#include <afxext.h> // MFC <20><>չ
|
||||
|
||||
|
||||
#include <afxdisp.h> // MFC <20>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
|
||||
#ifndef _AFX_NO_OLE_SUPPORT
|
||||
#include <afxdtctl.h> // MFC <20><> Internet Explorer 4 <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>֧<EFBFBD><D6A7>
|
||||
#endif
|
||||
@@ -40,10 +37,6 @@
|
||||
|
||||
#include <afxcontrolbars.h> // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϳؼ<CDBF><D8BC><EFBFBD><EFBFBD><EFBFBD> MFC ֧<><D6A7>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
// <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>䷽ʽ
|
||||
@@ -220,3 +213,25 @@ enum
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>C<EFBFBD><43><EFBFBD><EFBFBD>ʱ<EFBFBD>ȴ<EFBFBD>T<EFBFBD><54>(<28><><EFBFBD><EFBFBD>1ms)
|
||||
#define WAIT_1(C, T) { timeBeginPeriod(1); WAIT_n(C, T, 1); timeEndPeriod(1); }
|
||||
|
||||
// <20><><EFBFBD>ܼ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㺯<EFBFBD><E3BAAF><EFBFBD>ĺ<EFBFBD>ʱ
|
||||
class auto_tick
|
||||
{
|
||||
private:
|
||||
const char *func;
|
||||
int threshold;
|
||||
clock_t tick;
|
||||
__inline clock_t now() const { return clock(); }
|
||||
|
||||
public:
|
||||
auto_tick(const char *func_name, int th=5) : func(func_name), threshold(th), tick(now()) { }
|
||||
~auto_tick(){int s(this->time());if(s>threshold)TRACE("[%s]ִ<><D6B4>ʱ<EFBFBD><CAB1>: [%d]ms.\n", func, s);}
|
||||
__inline int time() const { return now() - tick; }
|
||||
};
|
||||
|
||||
#ifdef _DEBUG
|
||||
// <20><><EFBFBD>ܼ<EFBFBD><DCBC>㵱ǰ<E3B5B1><C7B0><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ӡ
|
||||
#define AUTO_TICK(thresh) auto_tick(__FUNCTION__, thresh)
|
||||
#else
|
||||
#define AUTO_TICK(thresh)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user