Stop the timer for the given timer handle and update the timings
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timer_type), | intent(inout), | optional | :: | me |
timer object |
|
integer, | intent(in) | :: | timerHandle |
Handle of the timer to stop |
subroutine tem_stopTimer( me, timerHandle )
! -------------------------------------------------------------------- !
!> timer object
type(tem_timer_type), intent(inout), optional :: me
!> Handle of the timer to stop
integer, intent(in) :: timerHandle
! -------------------------------------------------------------------- !
real(kind=rk) :: endTime
! -------------------------------------------------------------------- !
endTime = mpi_wtime()
if ( present(me) ) then
if ( me%running%val(timerHandle) ) then
me%running%val(timerHandle) = .false.
me%duration%val(timerHandle) = me%duration%val(timerHandle) &
& + endTime &
& - me%tStart%val(timerHandle)
end if
else
if ( timer%timedat%running%val(timerHandle) ) then
timer%timedat%running%val(timerHandle) = .false.
timer%timedat%duration%val(timerHandle) &
& = timer%timedat%duration%val(timerHandle) &
& + endTime &
& - timer%timedat%tStart%val(timerHandle)
end if
end if
end subroutine tem_stopTimer