@@ -14,6 +14,7 @@ pub type rlim_t = u64;
14
14
pub type mach_timebase_info_data_t = mach_timebase_info ;
15
15
pub type pthread_key_t = c_ulong ;
16
16
pub type sigset_t = u32 ;
17
+ pub type clockid_t = :: c_uint ;
17
18
pub type fsblkcnt_t = :: c_uint ;
18
19
pub type fsfilcnt_t = :: c_uint ;
19
20
pub type speed_t = :: c_ulong ;
@@ -493,6 +494,11 @@ pub const ABMON_10: ::nl_item = 42;
493
494
pub const ABMON_11 : :: nl_item = 43 ;
494
495
pub const ABMON_12 : :: nl_item = 44 ;
495
496
497
+ pub const CLOCK_REALTIME : :: clockid_t = 0 ;
498
+ pub const CLOCK_MONOTONIC : :: clockid_t = 6 ;
499
+ pub const CLOCK_PROCESS_CPUTIME_ID : :: clockid_t = 12 ;
500
+ pub const CLOCK_THREAD_CPUTIME_ID : :: clockid_t = 16 ;
501
+
496
502
pub const ERA : :: nl_item = 45 ;
497
503
pub const ERA_D_FMT : :: nl_item = 46 ;
498
504
pub const ERA_D_T_FMT : :: nl_item = 47 ;
@@ -1976,6 +1982,9 @@ extern {
1976
1982
pub fn aio_suspend ( aiocb_list : * const * const aiocb , nitems : :: c_int ,
1977
1983
timeout : * const :: timespec ) -> :: c_int ;
1978
1984
pub fn aio_cancel ( fd : :: c_int , aiocbp : * mut aiocb ) -> :: c_int ;
1985
+ pub fn clock_getres ( clk_id : :: clockid_t , tp : * mut :: timespec ) -> :: c_int ;
1986
+ pub fn clock_gettime ( clk_id : :: clockid_t , tp : * mut :: timespec ) -> :: c_int ;
1987
+ pub fn clock_settime ( clk_id : :: clockid_t , tp : * const :: timespec ) -> :: c_int ;
1979
1988
pub fn lio_listio ( mode : :: c_int , aiocb_list : * const * mut aiocb ,
1980
1989
nitems : :: c_int , sevp : * mut sigevent ) -> :: c_int ;
1981
1990
0 commit comments