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 | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(timer), | intent(inout) | :: | this |
Running wall-clock timer instance to pause. |
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