【自定义函数】根据秒数获得时分秒
function GetTimeStr(Sec: Integer): string; begin
if Sec >= 3600 then
Result := Format('%d小时%d分钟%d秒', [Sec div 3600, Sec mod 3600 div 60, Sec mod 60]) else if Sec >= 60 then
Result := Format('%d分钟%d秒', [Sec div 60, Sec mod 60]) else
Result := Format('%d秒', [Sec]);
end;
Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号
执行时间: 0.047569990158081 seconds