timer_start Subroutine

private subroutine timer_start(self)

starts the timer. If OMP is enabled, it will use omp_get_wtime() if not, it will use Fortran’s system_clock

Usage: call my_timer%start()

Usage assumes a declaration of type(pic_timer_type) :: my_timer

Type Bound

pic_timer_type

Arguments

Type IntentOptional Attributes Name
class(pic_timer_type), intent(inout) :: self

Called by

proc~~timer_start~~CalledByGraph proc~timer_start pic_timer_type%timer_start proc~flop_rate_start_time flop_rate_type%flop_rate_start_time proc~flop_rate_start_time->proc~timer_start

Source Code

   subroutine timer_start(self)
      !! starts the timer. If OMP is enabled, it will use omp_get_wtime()
      !! if not, it will use Fortran's system_clock
      !!
      !! Usage: call my_timer%start()
      !!
      !! Usage assumes a declaration of type(pic_timer_type) :: my_timer
      class(pic_timer_type), intent(inout) :: self
      self%is_running = .true.
#ifdef _OPENMP
      self%start_time = omp_get_wtime()
#else
      call system_clock(self%start_count, self%count_rate)
#endif
   end subroutine timer_start