ordinal_seconds(3f) - [M_time:ORDINAL_DAY] seconds since beginning of year (LICENSE:MIT)
Synopsis
Description
Example
Author
License
function ordinal_seconds()
integer :: ordinal_seconds
Return number of seconds since beginning of current year.Before using this routine consider the consequences if the application is running at the moment a new year begins.
sample program
program demo_ordinal_seconds use M_time, only : ordinal_seconds implicit none character(len=*),parameter :: gen=(*(g0)) integer :: i, istart, iend real,volatile :: x istart = ordinal_seconds() x = 0.0 do i = 1, 1000000000 x = x+sqrt(real(i)) enddo print gen, x=,x iend = ordinal_seconds() print gen, that took ,iend-istart, seconds print gen, iend,-,istart,=,iend-istart end program demo_ordinal_secondsResults:
> x=0.549755814E+12 > that took 4 seconds > 23659912-23659908=4
John S. Urban, 2015
Nemo Release 3.1 | ordinal_seconds (3) | February 23, 2025 |