ESMF_TimeDiff Function

private function ESMF_TimeDiff(time1, time2)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Time), intent(in) :: time1
type(ESMF_Time), intent(in) :: time2

Return Value type(ESMF_TimeInterval)


Source Code

      function ESMF_TimeDiff(time1, time2)
!
! !RETURN VALUE:
      type(ESMF_TimeInterval) :: ESMF_TimeDiff
!
! !ARGUMENTS:
      type(ESMF_Time), intent(in) :: time1
      type(ESMF_Time), intent(in) :: time2

! !DESCRIPTION:
!     This method overloads the (-) operator for the {\tt ESMF\_Time} class.
!     See "interface operator(-)" above for complete description.
!
!EOPI
      integer :: localrc

      ! check inputs
      ESMF_INIT_CHECK_SHALLOW(ESMF_TimeGetInit,time1,localrc)
      ESMF_INIT_CHECK_SHALLOW(ESMF_TimeGetInit,time2,localrc)

      ! invoke C to C++ entry point
      call c_ESMC_TimeDiff(time1, time2, ESMF_TimeDiff)

      ! mark output as successfully initialized
      call ESMF_TimeIntervalInit(ESMF_TimeDiff)

      end function ESMF_TimeDiff