Add new start time to the entry
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_stack_entry), | intent(inout) | :: | this |
subroutine increment_entry(this)
class(mimic_stack_entry), intent(inout) :: this
real(dp), dimension(:), allocatable :: temp_times
this%num_calls = this%num_calls + 1
if (allocated(this%start_times)) then
call move_alloc(this%start_times, temp_times)
allocate(this%start_times(this%num_calls))
this%start_times(1:size(temp_times)) = temp_times
deallocate(temp_times)
call move_alloc(this%end_times, temp_times)
allocate(this%end_times(this%num_calls))
this%end_times(1:size(temp_times)) = temp_times
else
allocate(this%start_times(1))
allocate(this%end_times(1))
end if
this%start_times(this%num_calls) = get_time()
end subroutine increment_entry