module KillLineMain implicit none public contains ! subroutine KillLine_Setup() ! ! use CSimulationVariables ! implicit none ! call OnSimulationInitialization%Add(KillLine_Init) ! call OnSimulationStop%Add(KillLine_Init) ! call OnKillLineStep%Add(KillLine_Step) ! call OnKillLineOutput%Add(KillLine_Output) ! call OnKillLineMain%Add(KillLineMainBody) ! end subroutine ! subroutine KillLine_Init ! implicit none ! end subroutine KillLine_Init subroutine KillLine_Step use VARIABLES implicit none if (KillLine%finished/=0) then call KILL_LINE if (KillLine%IsOpening .or. KillLine%IsClosing) then if(KillLine%finished==0) then call KILL_LINE_SUB !only body of loop2 endif endif else call KILL_LINE_SUB endif end subroutine KillLine_Step ! subroutine KillLine_Output ! implicit none ! end subroutine KillLine_Output ! subroutine KillLineMainBody ! USE ifport ! USE ifmt ! ! use CSimulationVariables ! ! USE BOP ! implicit none ! INTEGER :: KillLineDuration ! integer,dimension(8) :: KillLineStartTime , KillLineEndTime ! ! CALL BOP_StartUp() ! loop1: DO ! CALL DATE_AND_TIME(values=KillLineStartTime) ! CALL KILL_LINE ! CALL DATE_AND_TIME(values=KillLineEndTime) ! KillLineDuration = 3600000 * (KillLineEndTime(5) - KillLineStartTime(5)) + 60000 * (KillLineEndTime(6) - KillLineStartTime(6)) + 1000 * (KillLineEndTime(7) - KillLineStartTime(7)) + (KillLineEndTime(8) - KillLineStartTime(8)) ! if (KillLineDuration < 100) then ! call sleepqq(100 - KillLineDuration) ! ELSE ! WRITE (*,*) 'KillLine BOP run duration exceeded 100 ms and =', KillLineDuration ! end if ! IF (IsStopped==.true.) THEN ! EXIT loop1 ! ENDIF ! ENDDO loop1 ! ! CALL DEALLOCATE_ARRAYS() ! end subroutine KillLineMainBody end module KillLineMain