function GetTimeStr(Sec: Integer): string; begin if Sec >= 3600 then Result := Format(‘%d hour %d min %d sec‘, [Sec div 3600, Sec mod 3600 div 60, Sec mod 60]) else if Sec >= 60 then Result := Format(‘%d min %d sec‘, [Sec div 60, Sec mod 60]) else Result := Format(‘%d sec‘, [Sec]); end; procedure TForm1.FormCreate(Sender: TObject); begin caption:=GetTimeStr(120); end;