123456

 

2011年7月4日

怎么得到执行复杂的算法时需要的时间量

摘要: 第一种方法:dwOldTime = GetTickCount();DoSomething();dwTimeElapsed = GetTickCount() – dwOldTime;第二种方法:class CStopwatch {public: CStopwatch() { QueryPerformanceFrequency(&m_liPerfFreq); Start(); } void Start() { QueryPerformanceCounter(&m_liPerfStart); } __int64 Now() const... 阅读全文

posted @ 2011-07-04 16:55 hgy413 阅读(245) 评论(0) 推荐(0) 编辑

伪句柄

摘要: DWORD WINAPI ParentThread(PVOID pvParam){ HANDLE hThreadParent = GetCurrentThread(); CreateThread(NULL, 0 , ChildThread, (PVOID)hThreadParent, 0, NULL); //Function continues...}DWORD WINAPI ChildThread(PVOID pvParam) { HANDLE hThreadParent = (HANDLE) pvParam; FILETIME ftCreationTime, ftExi... 阅读全文

posted @ 2011-07-04 10:00 hgy413 阅读(159) 评论(0) 推荐(0) 编辑

导航