2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: CPU_TIME, time, elapsed
10 CPU_TIME --- CPU elapsed time in seconds
11 ****************************************
13 .. function:: CPU_TIME(TIME)
15 Returns a ``REAL`` value representing the elapsed CPU time in
16 seconds. This is useful for testing segments of code to determine
20 The type shall be ``REAL`` with ``INTENT(OUT)``.
32 .. code-block:: fortran
37 .. code-block:: fortran
42 ! put code to test here
44 print '("Time = ",f6.3," seconds.")',finish-start
45 end program test_cpu_time