# GetCpuTimerFrequency()

> This returns the frequency of CPU timer on the current platform. If the platform does not support returning this value it will return 0.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static ulong GetCpuTimerFrequency()
```

### Returns

| Type                                                          | Description                               |
| ------------------------------------------------------------- | ----------------------------------------- |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) | CPU timer frequency for current platform. |

### Remarks

The following example demonstrates how to use `GetCpuTimerFrequency` to convert timestamps data to seconds.

### Examples

```csharp
using UnityEngine;

class Example
{
    public static double TimestampToMilliseconds(ulong timestamp)
    {
         return (timestamp * 1000.0) / FrameTimingManager.GetCpuTimerFrequency();
    }

    public static double TimestampToSeconds(ulong timestamp)
    {
         return (timestamp * 1000.0 * 1000.0) / FrameTimingManager.GetCpuTimerFrequency();
    }
}
```
