t = secnds( t0 ) | |||
---|---|---|---|
t0 |
REAL |
Input |
Constant, variable, or array element |
Return Value |
REAL |
Output |
Number of seconds since midnight, minus t0 |
demo% cat sec1.f real elapsed, t0, t1, x, y t0 = 0.0 t1 = secnds( t0 ) y = 0.1 do i = 1, 1000 x = asin( y ) end do elapsed = secnds( t1 ) write ( *, 1 ) elapsed 1 format ( ' 1000 arcsines: ', f12.6, ' sec' ) end demo% f77 -silent sec1.f demo% a.out 1000 arcsines: 6.699141 sec demo%
Note that:
The returned value from SECNDS is accurate to 0.01 second.
The value is the system time, as the number of seconds from midnight, and it correctly spans midnight.
Some precision may be lost for small time intervals near the end of the day.