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;
 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-09
  • 2021-11-03
  • 2021-12-31
相关资源
相似解决方案