---
title: aclrtEventGetTimestamp
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclcppdevg_03_1780.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclcppdevg_03_1780.html
indexId: 7f4118910c0cd58dc6b8d0438f5b7bbd279509d81b66969363ed1b4bdf3ecfec68
---
# aclrtEventGetTimestamp

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |


#### 功能说明

获取Event的执行结束时间点（表示从AI处理器系统启动以来的时间）。

本接口需与其它关键接口配合使用，接口调用顺序：调用aclrtCreateEvent/aclrtCreateEventWithFlag接口创建Event-->调用aclrtRecordEvent接口在Stream中记录Event>调用aclrtSynchronizeStream接口阻塞应用程序运行，直到指定Stream中的所有任务都完成-->调用aclrtEventGetTimestamp接口获取Event的执行时间。


#### 函数原型

```
aclError aclrtEventGetTimestamp(aclrtEvent event, uint64_t *timestamp)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| event | 输入 | 查询的Event。类型定义请参见aclrtEvent。 |
| timestamp | 输出 | Event执行结束的时间点，单位为微秒。 |


#### 返回值说明

返回0表示成功，返回其他值表示失败，请参见aclError。
