F.1.10 Reset_Timer Procedure

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

  subroutine Reset_Timer (Timer)

    ! Input/Output variable.

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

    ! Internal variables.

    type(character,80) :: Name                ! Timer name.


    ! Verify requirements.

    VERIFY(Valid_State(Timer),5)  ! Timer is valid.

    ! Save name of Timer.

    Name = Timer%Name

    ! Reset Timer to initial state.

    call Finalize (Timer)
    call Initialize (Timer, Name)

    ! Verify guarantees.

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

  end subroutine Reset_Timer

Michael L. Hall