Auto merge of #473 - LegNeato:master, r=alexcrichton

Add clock_settime()

See http://www.catb.org/esr/time-programming/#_clock_gettime_2_clock_settime_2_clock_getres_2
This commit is contained in:
bors 2016-12-15 06:59:44 +00:00
commit 17ad72e2d8
6 changed files with 7 additions and 0 deletions

View File

@ -374,6 +374,7 @@ extern {
-> ::c_int;
pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
pub fn setutxdb(_type: ::c_uint, file: *mut ::c_char) -> ::c_int;

View File

@ -364,6 +364,7 @@ extern {
pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
len: ::off_t) -> ::c_int;

View File

@ -472,6 +472,8 @@ extern {
pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__clock_gettime50")]
pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__clock_settime50")]
pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
pub fn __errno() -> *mut ::c_int;
pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t)
-> ::c_int;

View File

@ -712,6 +712,7 @@ f! {
extern {
pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int;
pub fn clock_settime(clk_id: ::c_int, tp: *const ::timespec) -> ::c_int;
pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
guardsize: *mut ::size_t) -> ::c_int;
pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,

View File

@ -725,6 +725,7 @@ extern {
flags: ::c_int,
rqtp: *const ::timespec,
rmtp: *mut ::timespec) -> ::c_int;
pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
pub fn prctl(option: ::c_int, ...) -> ::c_int;
pub fn pthread_getattr_np(native: ::pthread_t,
attr: *mut ::pthread_attr_t) -> ::c_int;

View File

@ -979,6 +979,7 @@ extern {
flags: ::c_int,
rqtp: *const ::timespec,
rmtp: *mut ::timespec) -> ::c_int;
pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
pub fn getnameinfo(sa: *const ::sockaddr,
salen: ::socklen_t,
host: *mut ::c_char,