Man Page etime.3f




NAME

     etime, dtime - return elapsed time


SYNOPSIS

     real function etime (time)
     real time(2)

     real function dtime (time)
     real time(2)


DESCRIPTION

     These functions return elapsed time in seconds.

     The versions of etime and dtime used  by  f77  return  times
     produced  by the runtime system's high resolution clock. The
     actual resolution depends on the system platform.  The reso-
     lutions of the clocks on current platforms range between one
     nanosecond and one microsecond.

     Versions of etime and dtime used by f95 use the system's low
     resolution  clock by default, the resolution of which is one
     hundreth of a second. However, if the program is  run  under
     the  SunOS  utility ptime, ( /usr/proc/bin/ptime), etime and
     dtime use the high resolution clock.


     NOTE: The very first call to etime or dtime may  be  inaccu-
     rate.

     If there is an error:

     o Argument elements time(1) and time(2) are undefined

     o Function return value = -1.0

     If there is no error:

     o Argument:  user time in time(1) and system time in time(2)

     o Function return value: sum of time(1) and time(2)

     dtime returns the elapsed time since the last call to dtime.

     For dtime, the elapsed time is:

     o On the first call, elapsed time since the start of  execu-
       tion

     o On the second and subsequent calls, the elapsed time since
       the last call to dtime

     o For single processor, the time used by the CPU
     o For multiple processors, the sum of times for all the CPUs
       (not useful, use etime)
       Note:  Do not call dtime from within a parallelized loop.

     etime returns the elapsed time since the start of execution.

     For etime, the elapsed time is:

     o For single processor:  the CPU time for the  calling  pro-
       cess

     o For multiple processors:  the wall-clock time  while  run-
       ning your program
       Note:  time(1) contains the wall clock  time;  time(2)  is
       0.0.

     f77 determines single versus multiple  processing  depending
     on  whether  a program is linked with the multithreaded ver-
     sion of the  FORTRAN  77  library,  libF77_mt,  and  if  the
     environment variable PARALLEL is:

     Undefined,
          then the current run is single processor.

     Defined, and in the range 1, 2, 3, ...,
          then the current run is multiple processor.

     Defined, but some value other than 1, 2, 3, ...,
          then the results are unpredictable.


FILES

     libF77.a, libF77_mt.a, libF77.so, libF77_mt.so


SEE ALSO

     times(2), f77(1),  Fortran  User's  Guide  and  the  Fortran
     Library Reference