How to time a function call
Do not use GetTickCount! You can't time with that. The ticks are not on every system the same.
You can use QueryPerformanceCounter for this.
Code:
LARGE_INTEGER StartTime;
::QueryPerformanceCounter(&StartTime);
//Run the function
LARGE_INTEGER StopTime;
::QueryPerformanceCounter(&StopTime);
LARGE_INTEGER PerformanceFrequency;
::QueryPerformanceFrequency(&PerformanceFrequency);
double Frequency = PerformanceFrequency.QuadPart;
double TimePassed = ((StopTime.QuadPart - StartTime.QuadPart) / Frequency);