SYSTEM_CLOCK — Time functionCOUNT_RATE is system dependent and can vary depending on the kind of the
arguments. For kind=4 arguments, COUNT usually represents
milliseconds, while for kind=8 arguments, COUNT typically
represents micro- or nanoseconds. COUNT_MAX usually equals
HUGE(COUNT_MAX).
If there is no clock, COUNT is set to -HUGE(COUNT), and
COUNT_RATE and COUNT_MAX are set to zero.
When running on a platform using the GNU C library (glibc), or a
derivative thereof, the high resolution monotonic clock is available
only when linking with the rt library. This can be done
explicitly by adding the -lrt flag when linking the
application, but is also done implicitly when using OpenMP.
CALL SYSTEM_CLOCK([COUNT, COUNT_RATE, COUNT_MAX])
| COUNT | (Optional) shall be a scalar of type
INTEGER with INTENT(OUT).
|
| COUNT_RATE | (Optional) shall be a scalar of type
INTEGER with INTENT(OUT).
|
| COUNT_MAX | (Optional) shall be a scalar of type
INTEGER with INTENT(OUT).
|
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