[処理を一時停止するる]
引数で指定された時間(秒)処理を停止します。
【ソースコード】 [tips0007.pas]
program tips0007;
{$APPTYPE CONSOLE}
uses Windows, SysUtils;
begin
writeLn('開始: ' + FormatDateTime('yyyy/m/d hh:mm:ss',now));
if ParamCount > 0 then
begin
sleep(1000 * strtoint(paramstr(1)));
end;
writeLn('終了: ' + FormatDateTime('yyyy/m/d hh:mm:ss',now));
end.
【コンパイル&実行】 [tips0007.bat]
dcc32 tips0007.pas
tips0007.exe 5 > tips0007.txt
pause
【実行結果】 [tips0007.txt]
開始: 2009/5/17 15:55:14
終了: 2009/5/17 15:55:19
Copyright c 2009, ohishi,All rights reserved.