Benchmarking Using Performance Counters
Version Compatibility: Visual Basic 6, Visual Basic 5
This module removes the time required to call the timing function itself, so you get an even more accurate reading. It can return 4 type of units : Seconds, milliSeconds, microseconds and beats(the smallest unit).
This is not 100% accurate, you should always perform more than one test before you conclude anything. You can measure only one segment at a time.
It uses the QueryPerformanceCounter and QueryPerformanceFrequency apis to do the timing measurements. this method is far more precise than using the GetTickCount api(which I used myself before I discovered performance counters).
Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.