SECNDS

8.213 SECNDS — Time function

Description:
SECNDS(X) gets the time in seconds from the real-time system clock. X is a reference time, also in seconds. If this is zero, the time in seconds from midnight is returned. This function is non-standard and its use is discouraged.
Standard:
GNU extension
Class:
Function
Syntax:
RESULT = SECNDS (X)
Arguments:
T Shall be of type REAL(4).
X Shall be of type REAL(4).
Return value:
None
Example:
program test_secnds
    integer :: i
    real(4) :: t1, t2
    print *, secnds (0.0)   ! seconds since midnight
    t1 = secnds (0.0)       ! reference time
    do i = 1, 10000000      ! do something
    end do
    t2 = secnds (t1)        ! elapsed time
    print *, "Something took ", t2, " seconds."
end program test_secnds

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gfortran/SECNDS.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部