@Anton
As far as I know the TickCount can be updated more than once per ms. I think that many newer computer already update tckCount every half millisecond.
This means that variable T in your suggested code might not represent time taken in ms. Now it is possible to retrieve information from OS to see how often is TickCount updated so you can then properly calculate the time taken.

Newer versions of Delphi also provides a special record called TStopWatch which tries to use the approach with best percision that is available on your computer. I have use it several times now for time profiling.

But most of the times I simply go and store a time at the start of the process and another at the end and then check how much millisceconds did pas between them.
Now you would probably say SilverWarior that approach doesn't provide good enough accuracy.
That usually doesen't present a problem to me becouse if posible I tend to repeat certain procedure multiple times and check how much time is taken for that.
Why am I doing so? Nowadays all computer support CPU autothrotling which can affect the test performance. Not to mention that you always have bunch of other processes running in the background which can consume veriable amounts of CPU power and greatly screw up your tests.