Fortran Wiki
system_clock

Description

Determines the count of milliseconds of wall clock time since the Epoch (00:00:00 UTC, January 1, 1970) modulo count_max, count_rate determines the number of clock ticks per second. count_rate and count_max are constant and specific to gfortran.

If there is no clock, count is set to -huge(count), and count_rate and count_max are set to zero

Standard

Fortran 95 and later

Class

Subroutine

Syntax

call system_clock([count, count_rate, count_max])

Arguments

  • count - (Optional) shall be a scalar of type default integer with intent(out).
  • count_rate - (Optional) shall be a scalar of type default integer with intent(out).
  • count_max - (Optional) shall be a scalar of type default integer with intent(out).

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, cpu_time

category: intrinsics