clock_settime
os
0.1.0
clock_
settime
Sections
参数
返回值
In os::
kernel::
syscall::
sys
os
::
kernel
::
syscall
::
sys
Function
clock_
settime
Copy item path
Source
pub fn clock_settime(clk_id: c_int, tp: *const
TimeSpec
) -> c_int
Expand description
设置指定时钟的时间系统调用
§
参数
clk_id
- 时钟 ID(如 CLOCK_REALTIME)
tp
- 指向用户空间 TimeSpec 结构体的指针,包含要设置的时间
§
返回值
成功
:返回 0,时钟时间被更新
失败
:返回负的 errno