# getcpufrequency

Returns CPU frequency value in GHz.

## Syntax

val = getcpufrequency()

## Output Parameters

val

  DOUBLE PRECISION. CPU frequency value in GHz.

## Description

The function getcpufrequency returns the CPU frequency in GHz. This value is used by second /dsecnd functions while converting CPU clocks into seconds.

Obtaining a frequency may take some time when second /dsecnd/getcpufrequency is called for the first time. To avoid it, call setcpufrequency before setting the exact CPU frequency if it is known in advance.

Parent topic: Timing Functions