views:

51

answers:

1

Hi

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

A: 

Try this

uses DateUtils;
var
  FromTime, ToTime: TDateTime;
  DiffMinutes: Integer;
begin
  FromTime := Now;

  // do your process

  ToTime := Now;
  DiffMinutes := MinutesBetween(ToTime,FromTime);
end;
Bharat
Thank u for replying, I apply it but it is not work because I used Trubo pascal 1.5 ... I think there are another function like TimerCount, GetTickCount, etc. Please, can you help me if u have any coding for this function??thanks
zenab
I'm surprised Turbo Pascal 1.5 even works on Windows 7.
Marco van de Voort