Issue 84205
Summary [flang] Extension: etime intrinsic
Labels
Assignees
Reporter DavidTruby
    The etime intrinsic is an extension provided by some other Fortran compilers (for example [gfortran](https://gcc.gnu.org/onlinedocs/gfortran/ETIME.html)). GFortran provides this intrinsic as both a subroutine and a function. 
The function version of this extension is used by OpenRadioss.
Syntax:
```
CALL ETIME(VALUES, TIME)
TIME = ETIME(VALUES)
```
Arguments:
```
VALUES	The type shall be REAL(4), DIMENSION(2).
TIME	The type shall be REAL(4).
```
Return value:
    Elapsed time in seconds since the start of program execution.

Example:
```
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
    ETIME(tarray, result)
    print *, result
    print *, tarray(1)
    print *, tarray(2)
end program test_etime
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to