clock_getres
os
0.1.0
clock_
getres
Sections
参数
返回值
In os::
kernel::
syscall::
sys
os
::
kernel
::
syscall
::
sys
Function
clock_
getres
Copy item path
Source
pub fn clock_getres(clk_id: c_int, tp: *mut
TimeSpec
) -> c_int
Expand description
获取指定时钟的分辨率系统调用
§
参数
clk_id
- 时钟 ID(如 CLOCK_REALTIME)
tp
- 指向用户空间 TimeSpec 结构体的指针,用于存储分辨率
§
返回值
成功
:返回 0,
tp
被填充时钟分辨率
失败
:返回负的 errno