My comment was very brief, to show very basic example of profiling.
I'm not sure that GetTickCount actually gets a value from a hardware tick counter directly. At least in Delphi for Windows it is alias for WinApi function GetTickCount (https://msdn.microsoft.com/en-us/library/aa915056.aspx this is for windows mobile, because the original help is somehow unavailable, but i think its the same of desktop windows), which is stated to return "milliseconds until windows has started". And if you run windows for a while this value will reset, since it is wrapper by max value of DWORD/Cardinal. Well of course it is not very precise, actually it seems it is update by over 16 milliseconds.
I havent used LclIntf.GetTickCount in Lazarus but I think it will have the same behavior as Winapi.
Yes i think this is very effective approachif posible I tend to repeat certain procedure multiple times and check how much time is taken for that
Bookmarks