From 326d3e312c74726814c39c9d112faab03c4a167c Mon Sep 17 00:00:00 2001 From: QuakeGod <QuakeGod@sina.com> Date: 星期日, 16 一月 2022 13:53:57 +0800 Subject: [PATCH] add status show function dialog --- MyLib/Functions.hpp | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/MyLib/Functions.hpp b/MyLib/Functions.hpp index 18ebecb..1367d09 100644 --- a/MyLib/Functions.hpp +++ b/MyLib/Functions.hpp @@ -74,6 +74,25 @@ // timeinter1=time2-time1; return (time1*1000); }; +inline double GetTimemS() +{ + LARGE_INTEGER perfreq; + LARGE_INTEGER percounter1; //,percounter2; + double time1; //,time2,timeinter1; + QueryPerformanceFrequency(&perfreq); + QueryPerformanceCounter(&percounter1); + // percounter1.QuadPart=rdtsc(); + /* _asm { + RDTSC; + mov percounter1.LowPart,eax; + mov percounter1.HighPart,edx; + } + */ + time1 = (double)percounter1.QuadPart / perfreq.QuadPart; + // time2=(double)percounter2.QuadPart/perfreq.QuadPart ; + // timeinter1=time2-time1; + return (time1 * 1000); +}; /* template <class ST> int Split(ST s1,ST divider, ST resultstr[]) @@ -219,6 +238,24 @@ } return i; } +inline void DivideStringToArray(const CString& strSrc, const CString& strSeparator, CStringArray &arrayDest) +{ + int startIndex = 0; + while (startIndex < strSrc.GetLength()) + { + int endIndex = strSrc.Find(strSeparator, startIndex); + + if (endIndex == -1) + { + endIndex = strSrc.GetLength(); + } + + arrayDest.Add( + strSrc.Mid(startIndex, endIndex - startIndex)); + + startIndex = endIndex + strSeparator.GetLength(); + } +} //*/ inline WCHAR* ToWChar(char * str) { -- Gitblit v1.9.1