|
|
|
@ -99,13 +99,13 @@ pub fn sys_waitpid(pid: isize, exit_code_ptr: *mut i32) -> isize {
|
|
|
|
|
// ---- release current PCB lock automatically
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn sys_get_time(ts: *mut TimeVal, _tz: usize) -> isize {
|
|
|
|
|
let us = get_time_us();
|
|
|
|
|
unsafe {
|
|
|
|
|
*ts = TimeVal {
|
|
|
|
|
sec: us / 1_000_000,
|
|
|
|
|
usec: us % 1_000_000,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
pub fn sys_get_time(_ts: *mut TimeVal, _tz: usize) -> isize {
|
|
|
|
|
let _us = get_time_us();
|
|
|
|
|
// unsafe {
|
|
|
|
|
// *ts = TimeVal {
|
|
|
|
|
// sec: us / 1_000_000,
|
|
|
|
|
// usec: us % 1_000_000,
|
|
|
|
|
// };
|
|
|
|
|
// }
|
|
|
|
|
0
|
|
|
|
|
}
|