timer_pause Subroutine

private subroutine timer_pause(this)

timer_pause records the current tick when the wall-clock timer is running and not already paused. Time spent paused is excluded from elapsed_time after a matching timer_resume.

Type Bound

timer

Arguments

Type IntentOptional Attributes Name
class(timer), intent(inout) :: this

Running wall-clock timer instance to pause.


Called by

proc~~timer_pause~~CalledByGraph proc~timer_pause timer%timer_pause proc~run_test31 run_test31 proc~run_test31->proc~timer_pause program~check check program~check->proc~run_test31

Source Code

   subroutine timer_pause(this)
      class(timer), intent(inout) :: this
         !! Running wall-clock timer instance to pause.

      if (.not. this%is_started) then
         write(error_unit, '(A)') 'Warning: timer_pause called before timer_start.'
         return
      end if

      if (this%is_paused) then
         write(error_unit, '(A)') 'Warning: timer is already paused.'
         return
      end if

      call system_clock(count=this%pause_start)
      this%is_paused = .true.
   end subroutine timer_pause