Skip to content
Snippets Groups Projects
Commit 229ca667 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'usleep' into 'master'

Fix usleep

Closes #144

See merge request redox-os/relibc!204
parents 7a1e2a62 e01d1ce1
No related branches found
No related tags found
No related merge requests found
...@@ -666,7 +666,7 @@ pub unsafe extern "C" fn unlink(path: *const c_char) -> c_int { ...@@ -666,7 +666,7 @@ pub unsafe extern "C" fn unlink(path: *const c_char) -> c_int {
pub extern "C" fn usleep(useconds: useconds_t) -> c_int { pub extern "C" fn usleep(useconds: useconds_t) -> c_int {
let rqtp = timespec { let rqtp = timespec {
tv_sec: (useconds / 1_000_000) as i64, tv_sec: (useconds / 1_000_000) as i64,
tv_nsec: ((useconds % 1000) * 1000) as i64, tv_nsec: ((useconds % 1_000_000) * 1000) as i64,
}; };
let rmtp = ptr::null_mut(); let rmtp = ptr::null_mut();
Sys::nanosleep(&rqtp, rmtp) Sys::nanosleep(&rqtp, rmtp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment