I thought TDateTimes store the time in milli-seconds so that doing the
following should work (at least for times in the same day):
 
var
  start_time, end_time : TDateTime;
  duration : double;
begin
  start_time := Now;
  ...
  end_time := Now;
 
  duration := (end_time - start_time) * 1000; {duration in seconds...}
  ShowMessage('process took'+Format('%f',[duration])+' seconds');
end;
 
For a process that took 2:21:43 (2 hours, 21 minutes), last night my
code showed '97.22  seconds'.  Mmmh - I need to decode the date_times?

Grant Black 
Software Developer 
SmartMove (NZ) Ltd 
Phone:     +64 9 361-0219 extn 719 
Fax  :     +64 9 361-0211 
Email:     [EMAIL PROTECTED] 

 
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to