ESMF_TraceClock Subroutine

public subroutine ESMF_TraceClock(clock, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Clock) :: clock
integer, intent(out), optional :: rc

Source Code

  subroutine ESMF_TraceClock(clock, rc)
! !ARGUMENTS: 
    type(ESMF_Clock) :: clock
    integer, intent(out), optional  :: rc
!
!EOPI
!-------------------------------------------------------------------------------
    ! locals
    type(ESMF_Time) :: currTime
    integer :: yy, mm, dd, h, m, s
    
    if (present(rc)) rc = ESMF_SUCCESS 

    call ESMF_ClockGet(clock, currTime=currTime, rc=rc)
    if (ESMF_LogFoundError(rc, ESMF_ERR_PASSTHRU, &
         ESMF_CONTEXT, rcToReturn=rc)) return
    call ESMF_TimeGet(currTime, yy=yy, mm=mm, dd=dd, h=h, m=m, s=s, rc=rc)
    if (ESMF_LogFoundError(rc, ESMF_ERR_PASSTHRU, &
         ESMF_CONTEXT, rcToReturn=rc)) return
    call c_esmftrace_clock(yy, mm, dd, h, m, s, rc)
    if (ESMF_LogFoundError(rc, ESMF_ERR_PASSTHRU, &
         ESMF_CONTEXT, rcToReturn=rc)) return
    
  end subroutine ESMF_TraceClock