adds the given timer_env to the top of the stack
for each init_timer_env there should be the symmetric call to rm_timer_env
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(timer_env_type), | optional, | POINTER | :: | timer_env |
SUBROUTINE add_timer_env(timer_env)
!! adds the given timer_env to the top of the stack
!! @note
!! for each init_timer_env there should be the symmetric call to
!! rm_timer_env
TYPE(timer_env_type), OPTIONAL, POINTER :: timer_env
TYPE(timer_env_type), POINTER :: timer_env_
IF (PRESENT(timer_env)) timer_env_ => timer_env
IF (.NOT. PRESENT(timer_env)) CALL timer_env_create(timer_env_)
IF (.NOT. ASSOCIATED(timer_env_)) &
DBCSR_ABORT("add_timer_env: not associated")
CALL timer_env_retain(timer_env_)
IF (.NOT. list_isready(timers_stack)) CALL list_init(timers_stack)
CALL list_push(timers_stack, timer_env_)
END SUBROUTINE add_timer_env