| | |
| | | // 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[])
|
| | |
| | | }
|
| | | 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)
|
| | | {
|