|
Posted by William on November 04, 2005
In Reply to: calculating difference of time posted by robert on October 20,
2005: Declare two Delphi TDateTime variables, e.g. T1 for the starting time and T2 for the ending time. To measure and display the time span that a process takes: T1 := Now;
Label1.Caption := FormatDateTime('"Start: " hh:nn:ss.zzz', T1);
// Process that you want to time:...
// ...
T2 := Now;
Label2.Caption := FormatDateTime('"Stop: " hh:nn:ss.zzz', T2);
Label3.Caption := FormatDateTime('"Diff: " hh:nn:ss.zzz', T2 - T1);
Related Articles and Replies Delphi Forum |
|