SYSTEM_CLOCK ([count] [,count-rate] [,count-max])
Class: Subroutine
Returns integer data from a real-time clock.
All arguments are scalar of type default integer. The "clock" is
set to a value based on the current value of the processor clock.
The value is increased by one for each clock count until the value
"countmax" is reached, and is reset to zero at the next count.
("count" lies in the range 0 to "countmax".) The "count-rate" is set
to the number of processor clock counts per second modified by the
kind of "count-rate." See the HP Fortran for OpenVMS Language
Reference Manual.
SYSTEM_CLOCK returns the number of seconds from 00:00 Coordinated
Universal Time (CUT) 1 JAN 1970. The number is returned with no
bias. To get the elapsed time, you must call SYSTEM_CLOCK twice,
and subtract the starting time value from the ending time value.
Examples:
Consider the following:
INTEGER(2) :: IC2, CRATE2, CMAX2
INTEGER(4) :: IC4, CRATE4, CMAX4
CALL SYSTEM_CLOCK(COUNT=IC2, COUNT_RATE=CRATE2, COUNT_MAX=CMAX2)
CALL SYSTEM_CLOCK(COUNT=IC4, COUNT_RATE=CRATE4, COUNT_MAX=CMAX4)
PRINT *, IC2, CRATE2, CMAX2
PRINT *, IC4, CRATE4, CMAX4
END
This program was run on Thursday Dec 11, 1997 at 14:23:55 EST and
produced the following output:
13880 1000 32767
1129498807 10000 2147483647