Please, I need to measure the search time in my pascal program in order to measure the performance efficient.. if there is any function or code to measure the search time?
thanks
Please, I need to measure the search time in my pascal program in order to measure the performance efficient.. if there is any function or code to measure the search time?
thanks
Try this
uses DateUtils;
var
FromTime, ToTime: TDateTime;
DiffMinutes: Integer;
begin
FromTime := Now;
// do your process
ToTime := Now;
DiffMinutes := MinutesBetween(ToTime,FromTime);
end;
It didnt work for me either, because Free Pascal dont find the "Now"-Function..
I just add "uses sysutils" in Bharats Answer and it works fine for me!
like:
uses DateUtils, sysutils;
var
FromTime, ToTime: TDateTime;
DiffMinutes: Integer;
begin
FromTime := Now;
// do your process
ToTime := Now;
DiffMinutes := MinutesBetween(ToTime,FromTime);
end;