tem_getTimerVal Function

public function tem_getTimerVal(me, timerHandle) result(retValue)

Write out the timer name and its value

Arguments

Type IntentOptional Attributes Name
type(tem_timer_type), intent(inout), optional :: me

timer object

integer, intent(in) :: timerHandle

timer handle

Return Value real(kind=rk)

timer value


Calls

proc~~tem_gettimerval~~CallsGraph proc~tem_gettimerval tem_getTimerVal proc~tem_stoptimer tem_stopTimer proc~tem_gettimerval->proc~tem_stoptimer mpi_wtime mpi_wtime proc~tem_stoptimer->mpi_wtime

Called by

proc~~tem_gettimerval~~CalledByGraph proc~tem_gettimerval tem_getTimerVal proc~tem_getmaxtimerval tem_getMaxTimerVal proc~tem_getmaxtimerval->proc~tem_gettimerval proc~tem_finalize tem_finalize proc~tem_finalize->proc~tem_gettimerval proc~tem_timer_dump_glob tem_timer_dump_glob proc~tem_finalize->proc~tem_timer_dump_glob proc~tem_getsumtimerval tem_getSumTimerVal proc~tem_getsumtimerval->proc~tem_gettimerval proc~tem_getmintimerval tem_getMinTimerVal proc~tem_getmintimerval->proc~tem_gettimerval proc~tem_getavetimerval tem_getAveTimerVal proc~tem_getavetimerval->proc~tem_gettimerval proc~tem_timer_dumplabeled tem_timer_dumplabeled proc~tem_timer_dumplabeled->proc~tem_getmaxtimerval proc~tem_timer_dumplabeled->proc~tem_getsumtimerval proc~tem_timer_dumplabeled->proc~tem_getmintimerval proc~tem_timer_dump_glob->proc~tem_timer_dumplabeled

Contents

Source Code


Source Code

  function tem_getTimerVal( me, timerHandle ) result( retValue )
    ! -------------------------------------------------------------------- !
    !> timer object
    type(tem_timer_type), intent(inout), optional :: me
    !> timer handle
    integer, intent(in) :: timerHandle
    !> timer value
    real(kind=rk) :: retValue
    ! -------------------------------------------------------------------- !

    if ( present(me) ) then
      if ( me%running%val(timerHandle) ) then
        call tem_stoptimer(me, timerhandle)
      end if
      retValue = me%duration%val(timerHandle)
    else
      if ( timer%timedat%running%val(timerHandle) ) then
        call tem_stoptimer(timerhandle = timerhandle)
      end if
      retValue = timer%timedat%duration%val(timerHandle)
    end if

  end function tem_getTimerVal