F.1.11 Start_Timer Procedure

The main documentation of the Start_Timer Procedure contains additional explanation of this code listing.

  subroutine Start_Timer (Timer)

    ! Input/Output variable.

    type(Timer_type), intent(inout) :: Timer  ! Timer to be started.


    ! Verify requirements.

    VERIFY(Valid_State(Timer),5)  ! Timer is valid.
    VERIFY(.not.Timer%Running,5)  ! Timer is not running.

    ! Set start times.

    Timer%Wall_Clock_Time%Start = Get_Wall_Clock_Time()
    Timer%CPU_Time%Start = Get_CPU_Time()

    ! Set status.

    Timer%Running = .true.

    ! Verify guarantees.

    VERIFY(Valid_State(Timer),5)  ! Timer is valid.
    VERIFY(Timer%Running,5)       ! Timer is running.

  end subroutine Start_Timer

Michael L. Hall