@@ -20,6 +20,7 @@ pub type rlim_t = ::c_ulong;
20
20
pub type speed_t = :: c_uint ;
21
21
pub type tcflag_t = :: c_uint ;
22
22
pub type time_t = :: c_long ;
23
+ pub type timer_t = :: c_int ;
23
24
pub type wchar_t = :: c_int ;
24
25
pub type nfds_t = :: c_ulong ;
25
26
pub type projid_t = :: c_int ;
@@ -120,6 +121,11 @@ s! {
120
121
pub ifa_data: * mut :: c_void
121
122
}
122
123
124
+ pub struct itimerspec {
125
+ pub it_interval: :: timespec,
126
+ pub it_value: :: timespec,
127
+ }
128
+
123
129
pub struct tm {
124
130
pub tm_sec: :: c_int,
125
131
pub tm_min: :: c_int,
@@ -2656,6 +2662,21 @@ extern "C" {
2656
2662
pub fn ntp_adjtime ( buf : * mut timex ) -> :: c_int ;
2657
2663
pub fn ntp_gettime ( buf : * mut ntptimeval ) -> :: c_int ;
2658
2664
2665
+ pub fn timer_create (
2666
+ clock_id : clockid_t ,
2667
+ evp : * mut sigevent ,
2668
+ timerid : * mut timer_t ,
2669
+ ) -> :: c_int ;
2670
+ pub fn timer_delete ( timerid : timer_t ) -> :: c_int ;
2671
+ pub fn timer_getoverrun ( timerid : timer_t ) -> :: c_int ;
2672
+ pub fn timer_gettime ( timerid : timer_t , value : * mut itimerspec ) -> :: c_int ;
2673
+ pub fn timer_settime (
2674
+ timerid : timer_t ,
2675
+ flags : :: c_int ,
2676
+ value : * const itimerspec ,
2677
+ ovalue : * mut itimerspec ,
2678
+ ) -> :: c_int ;
2679
+
2659
2680
pub fn ucred_get ( pid : :: pid_t ) -> * mut ucred_t ;
2660
2681
pub fn getpeerucred ( fd : :: c_int , ucred : * mut * mut ucred_t ) -> :: c_int ;
2661
2682
0 commit comments