tem_addTimer Subroutine

public subroutine tem_addTimer(me, timerName, timerHandle)

Setup a new timer object, reset the values and give it a label for later identification

Arguments

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

timer object

character(len=*), intent(in) :: timerName

Name for this timer

integer, intent(out) :: timerHandle

A handle to reference this timer


Calls

proc~~tem_addtimer~~CallsGraph proc~tem_addtimer tem_addTimer interface~append~9 append proc~tem_addtimer->interface~append~9 proc~tem_appendtimers tem_appendTimers proc~tem_addtimer->proc~tem_appendtimers proc~append_da_label append_da_label interface~append~9->proc~append_da_label proc~append_da_veclabel append_da_veclabel interface~append~9->proc~append_da_veclabel proc~tem_appendtimers->interface~append~9 interface~sortedposofval~5 sortedposofval proc~append_da_label->interface~sortedposofval~5 interface~expand~9 expand proc~append_da_label->interface~expand~9 proc~append_da_veclabel->interface~expand~9 proc~sortposofval_label sortposofval_label interface~sortedposofval~5->proc~sortposofval_label proc~expand_da_label expand_da_label interface~expand~9->proc~expand_da_label

Called by

proc~~tem_addtimer~~CalledByGraph proc~tem_addtimer tem_addTimer proc~tem_simcontrol_load tem_simControl_load proc~tem_simcontrol_load->proc~tem_addtimer proc~tem_start tem_start proc~tem_start->proc~tem_addtimer proc~tem_load_general tem_load_general proc~tem_load_general->proc~tem_simcontrol_load

Contents

Source Code


Source Code

  subroutine tem_addTimer( me, timerName, timerHandle )
    ! -------------------------------------------------------------------- !
    !> timer object
    type(tem_labeledtimer_type), intent(inout), optional :: me
    !> Name for this timer
    character(len=*), intent(in) :: timerName
    !> A handle to reference this timer
    integer, intent(out) :: timerHandle
    ! -------------------------------------------------------------------- !
    logical :: is_newtimer
    ! -------------------------------------------------------------------- !

    if ( present(me) ) then
      call append( me       = me%label,        &
        &          val      = trim(timerName), &
        &          pos      = timerHandle,     &
        &          wasAdded = is_newtimer      )
      if (is_newtimer) then
        call tem_appendTimers( me    = me%timedat, &
          &                    nVals = 1           )
      end if
    else
      call append( me       = timer%label,     &
        &          val      = trim(timerName), &
        &          pos      = timerHandle,     &
        &          wasAdded = is_newtimer      )
      if (is_newtimer) then
        call tem_appendTimers( me    = timer%timedat, &
          &                    nVals = 1              )
      end if
    end if

  end subroutine tem_addTimer