> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GetClockCalibration

> 此方法在同一时刻对 CPU 和 GPU 时间戳计数器进行采样。

此方法在同一时刻对 CPU 和 GPU 时间戳计数器进行采样。

## 语法

```cpp theme={null}
HRESULT GetClockCalibration(
    UINT64  pGpuTimestamp,
    UINT64  pCpuTimestamp
)
```

### 参数

*pGpuTimestamp \[out]*\
类型：UINT64 \*

GPU 时间戳计数器的值。

*pCpuTimestamp \[out]*\
类型：UINT64 \*

CPU 时间戳计数器的值。

### 返回值

类型：HRESULT

此方法返回 [Direct3D 12 返回代码](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/d3d12-graphics-reference-returnvalues) 之一。

## 备注

有关详细信息，请参阅 [计时](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/timing)。

## 要求

**头文件：** d3d12\_xs.h 或 d3d12\_x.h\
**库：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支持的平台**：XBOX Series 主机和 XBOX One 系列

## 另请参阅

[ID3D12CommandQueue](https://docs.xbox.com/zh-CN/reference/graphics/d3d12_xs/interfaces/ID3D12CommandQueue/id3d12commandqueue_xs.md)


## Related topics

- [Get Time](https://docs.xbox.com/api-reference/title-wide-data-management/get-time.md)
- [获取时间](https://docs.xbox.com/zh-CN/services/playfab/api-references/rest/client/title-wide-data-management/get-time.md)
- [Get Segments](https://docs.xbox.com/api-reference/segments/get-segments.md)
- [Get Policy](https://docs.xbox.com/api-reference/authentication/get-policy.md)
- [Get Group](https://docs.xbox.com/api-reference/groups/get-group.md)
