ETIME(VALUES, TIME) returns the number of seconds of runtime since the start of the process’s execution in TIME. VALUES returns the user and system components of this time in
VALUES(2) respectively. TIME is equal to
VALUES(1) + VALUES(2).
On some systems, the underlying timings are represented using types with sufficiently small limits that overflows (wrap around) are possible, such as 32-bit types. Therefore, the values returned by this intrinsic might be, or become, negative, or numerically less than previous values, during a single run of the compiled program.
This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit.
VALUES and TIME are
INTENT(OUT) and provide the following:
||User time in seconds.|
||System time in seconds.|
||Run time since start in seconds.|
|VALUES||The type shall be
|TIME||The type shall be
Elapsed time in seconds since the start of program execution.
program test_etime integer(8) :: i, j real, dimension(2) :: tarray real :: result call ETIME(tarray, result) print *, result print *, tarray(1) print *, tarray(2) do i=1,100000000 ! Just a delay j = i * i - i end do call ETIME(tarray, result) print *, result print *, tarray(1) print *, tarray(2) end program test_etime
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.