Hi , i've 2 Clients " 2 Machines in my network " and a Server i use the following procedure to calc the elapsed time :
Delphi-Quellcode:
procedure TForm1.ElapsedTimeTimer(Sender: TObject);
var
s: string;
TotalTime: TDateTime;
DLTimes: Double;
Hh, Mh, Sec, MSec: Word;
begin
TotalTime:= Now-FStartTime;
DecodeTime(TotalTime, hH, Mh, Sec, MSec);
Sec := Sec + Mh * 60 + hH * 3600;
DLTimes := Sec + MSec / 1000;
s:=Format('%2d:%2d:%2d', [sSec div 3600, (Sec div 60) mod 60, Sec mod 60]);
label1.Caption:=FormatDateTime('"elapsed time : " hh:nn:ss', StrToTime(s));
end;
Let's suppose that ClientA's elapsed time is : 00:20:00 here when i transfer this elapsed time value to ClientB this letter elapsed time will become 12:20:00
so why 12:20:00 and not 00:20:00 ?
P.S : i use
Indy