Next: , Previous: COUNT, Up: Intrinsic Procedures


8.35 CPU_TIME — CPU elapsed time in seconds

Description:
Returns a REAL value representing the elapsed CPU time in seconds. This is useful for testing segments of code to determine execution time.
Option:
f95, gnu
Class:
subroutine
Syntax:
CPU_TIME(X)
Arguments:

X The type shall be REAL with INTENT(OUT).

Return value:
None
Example:
          program test_cpu_time
              real :: start, finish
              call cpu_time(start)
                  ! put code to test here
              call cpu_time(finish)
              print '("Time = ",f6.3," seconds.")',finish-start
          end program test_cpu_time