.\" @(#)etime.3f 1.6 86/01/02 SMI; from UCB 4.2 .TH ETIME 3F "00/01/25" .SH NAME etime, dtime \- return elapsed time .SH SYNOPSIS .B real function etime (time) .br .B real time(2) .sp 1 .B real function dtime (time) .br .B real time(2) .\" .SH DESCRIPTION These functions return elapsed time in seconds. .LP The versions of .B etime and .B dtime used by .B f77 return times produced by the runtime system's high resolution clock. The actual resolution depends on the system platform. The resolutions of the clocks on current platforms range between one nanosecond and one microsecond. .LP Versions of .B etime and .B dtime used by .B 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 .BR ptime , ( /usr/proc/bin/ptime), .B etime and .B dtime use the high resolution clock. .LP .I NOTE: The very first call to .B etime or .B dtime may be inaccurate. .LP If there is an error: .IP \(bu 2 Argument elements .B time(1) and .B time(2) are .I undefined .IP \(bu 2 Function return value = -1.0 .LP If there is no error: .IP \(bu 2 Argument: .I "user time" in .B time(1) and .I "system time" in .B time(2) .IP \(bu 2 Function return value: sum of .B time(1) and .B time(2) .LP .B dtime returns the elapsed time since the last call to .BR dtime . .LP For .BR dtime , the elapsed time is: .IP \(bu 2 On the first call, elapsed time since the start of execution .IP \(bu 2 On the second and subsequent calls, the elapsed time since the last call to .B dtime .IP \(bu 2 For .IR "single processor" , the time used by the CPU .IP \(bu 2 For .IR "multiple processors" , the sum of times for all the CPUs (not useful, use .BR etime ) .br .IR Note : Do not call .B dtime from within a parallelized loop. .LP .B etime returns the elapsed time since the start of execution. .LP For .BR etime , the elapsed time is: .IP \(bu 2 For .IR "single processor" : the CPU time for the calling process .IP \(bu 2 For .IR "multiple processors" : the wall-clock time while running your program .br .IR Note : .B time(1) contains the wall clock time; .B time(2) is 0.0. .LP .B f77 determines single versus multiple processing depending on whether a program is linked with the multithreaded version of the FORTRAN 77 library, .BR libF77_mt , and if the environment variable .B PARALLEL is: .TP Undefined, then the current run is .IR "single processor" . .TP Defined, and in the range 1, 2, 3, ..., then the current run is .IR "multiple processor" . .TP Defined, but some value other than 1, 2, 3, ..., then the results are unpredictable. .\" .SH FILES .\" .BR libF77.a , .BR libF77_mt.a , .BR libF77.so , .BR libF77_mt.so .\" .SH "SEE ALSO" .\" .BR times (2), .BR f77 (1), .I "Fortran User's Guide" and the .I "Fortran Library Reference"