我想要寫一支程式每分鐘會監控,但其中一段行為要在每間隔 5 分鐘才要觸發,請問要怎麼樣才能讓它判斷間隔 5 分鐘才能執行呢?謝謝!
if barfreq <> "Min" or Barinterval <>1 then RaiseRuntimeError("請設定頻率為 1 分鐘");
variable: _status_1(0), _status_2(0), _status_3(0);
if {條件1} then _status_1 = 1;
if {條件2} then _status_2 = 1;
if {條件3} then _status_3 = 1;
if _status_1 = 1 Or _status_2 = 1 then begin
if {每5分鐘} then begin
if {條件4} then {執行4};
end;
end else begin
if {條件5} then {執行5};
end;
2 評論