unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;

type
  TForm1 = class(TForm)
    Timer1: TTimer;
    StaticText1: TStaticText;
    procedure FormCreate(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
OperBegin, OperEnd: TTimeStamp;
  Total: LongWord;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
 OperBegin := DateTimeToTimeStamp(Now); 
end;

procedure TForm1.Timer1Timer(Sender: TObject);
var st1:string;
begin
OperEnd := DateTimeToTimeStamp(Now); {запоминается момент окончания операции}
  Total := OperEnd.Time - OperBegin.Time;
  Str(total,st1);
  staticText1.Caption:=St1;
  Application.ProcessMessages;
end;

end.
