时钟时钟读取
总结
执行时钟的基本读取。
声明
#include <zircon/syscalls.h>
zx_status_t zx_clock_read(zx_handle_t handle, zx_time_t* now);
权限
handle 必须为 ZX_OBJ_TYPE_CLOCK
类型,且具有 ZX_RIGHT_READ
。
说明
对时钟对象执行基本读取,并在 now out 参数中返回其当前时间。
返回值
如果成功,则在 now 输出参数中返回 ZX_OK
以及时钟的当前时间。
错误
ZX_ERR_BAD_HANDLE
:handle 是无效句柄,或者是非 ZX_OBJ_TYPE_CLOCK
对象类型的句柄。
ZX_ERR_ACCESS_DENIED
:handle 缺少 ZX_RIGHT_READ
右侧。
另请参阅
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-13。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]