test6 Program

Uses

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

Calls

program~~test6~~CallsGraph program~test6 test6 proc~ctimer_start timer%ctimer_start program~test6->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test6->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~test6->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 test6

   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(message = 'CPU time:')
   call t%ctimer_write('test/test6_ctimes.txt') ! Optionally, write the elapsed time to a file

end program test6