# second/dsecnd

Returns elapsed CPU time in seconds.

## Syntax

val = second()

val = dsecnd()

## Output Parameters

val

  REAL for second

  DOUBLE PRECISION for dsecnd

  Elapsed CPU time in seconds.

## Description

The second/dsecnd functions return the elapsed CPU time in seconds. These versions get the time from the elapsed CPU clocks divided by CPU frequency. The difference is that dsecnd returns the result with double presision.

The functions should be applied in pairs: the first time, before a routine to be measured, and the second time - after the measurement. The difference between the returned values is the time spent in the routine. The usage of second is discouraged for measuring short time intervals because the single precision format is not capable of holding sufficient timer precision.

Parent topic: Timing Functions