1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
use super::types::*;
#[repr(C)]
#[derive(Clone, Copy, Default)]
pub struct timespec_t {
pub tv_sec: time_t,
pub tv_nsec: isize,
}
#[repr(C)]
pub struct timeval_t {
pub tv_sec: time_t,
pub tv_usec: suseconds_t,
}
#[repr(C)]
pub struct timezone_t {
pub tz_minuteswest: i32,
tz_dsttime: i32,
}
pub const ITIMER_REAL: i32 = 0;
pub const ITIMER_VIRTUAL: i32 = 1;
pub const ITIMER_PROF: i32 = 2;
#[repr(C)]
pub struct itimerspec_t {
pub it_interval: timespec_t,
pub it_value: timespec_t,
}
#[repr(C)]
pub struct itimerval_t {
pub it_interval: timeval_t,
pub it_value: timeval_t,
}
pub const CLOCK_REALTIME: i32 = 0;
pub const CLOCK_MONOTONIC: i32 = 1;
pub const CLOCK_PROCESS_CPUTIME_ID: i32 = 2;
pub const CLOCK_THREAD_CPUTIME_ID: i32 = 3;
pub const CLOCK_MONOTONIC_RAW: i32 = 4;
pub const CLOCK_REALTIME_COARSE: i32 = 5;
pub const CLOCK_MONOTONIC_COARSE: i32 = 6;
pub const CLOCK_BOOTTIME: i32 = 7;
pub const CLOCK_REALTIME_ALARM: i32 = 8;
pub const CLOCK_BOOTTIME_ALARM: i32 = 9;
pub const CLOCK_SGI_CYCLE: i32 = 10;
pub const CLOCK_TAI: i32 = 11;
pub const MAX_CLOCKS: i32 = 16;
pub const CLOCKS_MASK: i32 = (CLOCK_REALTIME | CLOCK_MONOTONIC);
pub const CLOCKS_MONO: i32 = CLOCK_MONOTONIC;
pub const TIMER_ABSTIME: i32 = 0x01;