---
title: 函数：push
description: "| C函数原型 | aclError aclprofPush(void \\*stamp) |"
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgp/aclpythondevg_01_0848.html"
---

# 函数：push

| C函数原型 | aclError aclprofPush(void \*stamp) |
| --- | --- |
| Python函数 | ret = acl.prof.push(stamp) |
| 函数功能 | msproftx用于记录事件发生的时间跨度的开始时间。同步接口。 调用此接口后，Profiling自动在Stamp中记录开始的时间戳，将Event type设置为Push/Pop。 |
| 输入说明 | stamp：int，Stamp指针地址，指代msproftx事件标记。指定acl.prof.create\_stamp接口的指针地址。 |
| 返回值说明 | ret：int，错误码。 返回0表示成功。 返回其它值表示失败。 |
| 约束说明 | 与函数：pop接口成对使用，表示时间跨度的开始和结束。 不能跨线程调用，若需要跨线程可使用函数：range\_start/函数：range\_stop接口。 在函数：create\_stamp接口和函数：destroy\_stamp接口之间调用。 |
| 参考资源 | 接口调用示例，参见Profiling性能数据采集。 |
