10/23/2013

Window function GetTickCount, OpenCV function getTickCount (example source code)

Do not confuse,
GetTickCount and getTickCount is different function.
The first is ms window function.
The second is openCV function.
The method to use is little bit different.
Show example source code~!
-----------------------

unsigned long Atime=0, Btime=0;
unsigned long AAtime=0, BBtime=0;


Atime = GetTickCount();
AAtime = getTickCount();


someFunctionTakeLongTime(); //Test function


Btime = GetTickCount();
BBtime = getTickCount();


printf("%.2lf \n",  (Btime - Atime)/1000.0 );
printf("%.2lf \n",  (BBtime - AAtime)/getTickFrequency() );

-----------------------
Be careful when you use this function.




No comments:

Post a Comment