test5 Program

Uses

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

Calls

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

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

end program test5