> ## 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.

# GetTimestamp

> IGameInputReading::GetTimestamp

# IGameInputReading::GetTimestamp

检索与 `IGameInputReading` 关联的微秒级时间戳。

## 语法

```cpp theme={null}
uint64_t GetTimestamp();
```

### 返回值

类型：uint64\_t

描述输入发生时间的微秒级时间戳。

## 备注

在某些情况下，时间戳不足以区分两次不同的读数。你可以将此函数的结果与当前时间进行比较，方法是将其与 [IGameInput::GetCurrentTimeStamp](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrenttimestamp.md) 的返回结果进行比较。

## 要求

**头文件：** GameInput.h

[输入 API 概述](https://docs.xbox.com/zh-CN/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputReading](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputreading/igameinputreading.md)\
[IGameInput::GetCurrentTimeStamp.md](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrenttimestamp.md)

## 版本历史

| 版本 | 更改 |
| - | - |
| **v0** | 引入。 |


## Related topics

- [GameInput API 版本管理](https://docs.xbox.com/zh-CN/build/core-features/common/input/overviews/input-versioning.md)
- [GetTimestampFrequency](https://docs.xbox.com/zh-CN/reference/graphics/d3d12/interfaces/id3d12commandqueue/methods/id3d12commandqueue_gettimestampfrequency_public.md)
- [IGameInput::GetCurrentTimestamp](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrenttimestamp.md)
- [GetShapeSrcTimestamp](https://docs.xbox.com/zh-CN/reference/audio/shapesrccontext/functions/getshapesrctimestamp.md)
- [GetShapeDmaTimestamp](https://docs.xbox.com/zh-CN/reference/audio/shapedmacontext/functions/getshapedmatimestamp.md)
