APC AP9606 Specifications Page 89

  • Download
  • Add to my manuals
  • Print
  • Page
    / 96
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 88
Appendix C. DELAY3.EXE source 81
Appendix C. DELAY3.EXE source
{************************************************}
{ Delay3 tool }
{ written by Hendrik Ernst }
{ C 2000-04-05 }
{************************************************}
uses windos,wincrt,strings;
var TimeDelay,
StartHour, StartMinute, StartSeconds,
DelayHour, DelayMinute, DelaySeconds,
StopHour, StopMinute, StopSeconds,
OldSecond : word;
Hour, Minute, Second, Sec100: Word;
i, temp: word;
Code: Integer;
strHour, strMinute, strSeconds,
strStopHour, strStopMinute, strStopSeconds,
strTime,strStopTime:string;
begin
if ParamCount <> 1 then
begin
writeln('*******************************************************************************');
writeln('* Written by Hendrik Ernst *');
writeln('* Version 2000040703 *');
writeln('* C 2000-04-07 *');
writeln('*******************************************************************************');
writeln('* No or too many parameters! *');
writeln('* *');
writeln('* Please use the following syntax: *');
writeln('* delay xxx *');
writeln('* where xxx are the seconds that should be waited. *');
writeln('* The maximum time is 65000 Seconds *');
writeln('*******************************************************************************');
end
else
begin
{ Get text from command line }
Val(ParamStr(1), TimeDelay, Code);
{ Error during conversion to integer? }
if code <> 0 then
Writeln('Error at position: ', Code)
else
if (TimeDelay > 0) AND (TimeDelay < 65001) then
begin
Writeln('Value = ', TimeDelay);
GetTime(Hour, Minute, Second, Sec100);
StartHour:=Hour;
StartMinute:=Minute;
StartSeconds:=Second;
DelayHour:= TimeDelay div 3600;
DelayMinute:=(TimeDelay - DelayHour * 3600) div 60;
DelaySeconds:=(TimeDelay - DelayHour * 3600 - DelayMinute * 60);
Page view 88
1 2 ... 84 85 86 87 88 89 90 91 92 93 94 95 96

Comments to this Manuals

No comments