Stop timing last routine. This procedure will record the finishing time of the routine that was timed the last. Moreover, it will move one level up in the call stack hierarchy.
subroutine timer_stop()
type(mimic_stack_entry), pointer :: temp_parent => null()
if (.not. associated(current_entry)) then
return
endif
temp_parent => current_entry%parent
call timer%stop(current_entry)
current_entry => temp_parent
end subroutine timer_stop