Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

second/dsecnd

Returns elapsed time in seconds. Use to estimate real time between two calls to this function.

Syntax

val
=
second()
val
=
dsecnd()
Include Files
  • mkl.fi
Description
The
second
/
dsecnd
function returns time in seconds to be used to estimate real time between two calls to the function. The difference between these functions is in the precision of the floating-point type of the result: while
second
returns the single-precision type,
dsecnd
returns the double-precision type.
Use these functions to measure durations. To do this, call each of these functions twice. For example, to measure performance of a routine, call the appropriate function directly before a call to the routine to be measured, and then after the call of the routine. The difference between the returned values shows real time spent in the routine.
Initializations may take some time when the
second
/
dsecnd
function runs for the first time. To eliminate the effect of this extra time on your measurements, make the first call to
second
/
dsecnd
in advance.
Do not use
second
to measure short time intervals because the single-precision format is not capable of holding sufficient timer precision.
Return Values
Name
Type
Description
val
REAL
for
second
DOUBLE PRECISION
for
dsecnd
Elapsed real time in seconds

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804