SYSTEM_CLOCK — Time function#

SYSTEM_CLOCK(COUNT, COUNT_RATE, COUNT_MAX)#

Determines the COUNT of a processor clock since an unspecified time in the past modulo COUNT_MAX, COUNT_RATE determines the number of clock ticks per second. If the platform supports a monotonic clock, that clock is used and can, depending on the platform clock implementation, provide up to nanosecond resolution. If a monotonic clock is not available, the implementation falls back to a realtime clock.

Parameters:
  • COUNT – (Optional) shall be a scalar of type INTEGER with INTENT(OUT).

  • COUNT_RATE – (Optional) shall be a scalar of type INTEGER or REAL, with INTENT(OUT).

  • COUNT_MAX – (Optional) shall be a scalar of type INTEGER with INTENT(OUT).

Standard:

Fortran 90 and later

Class:

Subroutine

Syntax:
CALL SYSTEM_CLOCK([COUNT, COUNT_RATE, COUNT_MAX])
Example:
PROGRAM test_system_clock
  INTEGER :: count, count_rate, count_max
  CALL SYSTEM_CLOCK(count, count_rate, count_max)
  WRITE(*,*) count, count_rate, count_max
END PROGRAM
See also:

DATE_AND_TIME — Date and time subroutine, CPU_TIME — CPU elapsed time in seconds