test17 Program

Uses

  • program~~test17~~UsesGraph program~test17 test17 kinds kinds program~test17->kinds module~fortime fortime program~test17->module~fortime module~fortime->kinds

Calls

program~~test17~~CallsGraph program~test17 test17 proc~ctimer_start timer%ctimer_start program~test17->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test17->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~test17->proc~ctimer_write proc~print_time print_time proc~ctimer_stop->proc~print_time colorize colorize proc~print_time->colorize

Variables

Type Attributes Name Initial
integer :: nl
integer :: nloops = 3
type(timer) :: t

Source Code

program test17

   use kinds
   use fortime

   implicit none

   type(timer) :: t
   integer :: nl, nloops=3


   ! CPU time with nloops
   call t%ctimer_start()
   do nl = 1, nloops
      call sleep(1) ! Perform operations ntimes
   end do
   call t%ctimer_stop(nloops = nloops, message = 'CPU time:', print=.false.)
   call t%ctimer_write('test/test17_ctimes.txt') ! Optionally, write the elapsed time to a file

end program test17