Skip to main content

bnd_linux/libc/time/
mod.rs

1#[cfg(all(feature = "struct_timeval", feature = "types"))]
2windows_link::link!("c" "C" fn adjtime(__delta : *const super::struct_timeval::timeval, __olddelta : *mut super::struct_timeval::timeval) -> i32);
3#[cfg(feature = "struct_tm")]
4windows_link::link!("c" "C" fn asctime(__tp : *const super::struct_tm::tm) -> *mut i8);
5#[cfg(feature = "struct_tm")]
6windows_link::link!("c" "C" fn asctime_r(__tp : *const super::struct_tm::tm, __buf : *mut i8) -> *mut i8);
7#[cfg(all(feature = "clock_t", feature = "types"))]
8windows_link::link!("c" "C" fn clock() -> super::clock_t::clock_t);
9#[cfg(all(feature = "clockid_t", feature = "types"))]
10windows_link::link!("c" "C" fn clock_getcpuclockid(__pid : super::types::pid_t, __clock_id : *mut super::clockid_t::clockid_t) -> i32);
11#[cfg(all(feature = "clockid_t", feature = "struct_timespec", feature = "types"))]
12windows_link::link!("c" "C" fn clock_getres(__clock_id : super::clockid_t::clockid_t, __res : *mut super::struct_timespec::timespec) -> i32);
13#[cfg(all(feature = "clockid_t", feature = "struct_timespec", feature = "types"))]
14windows_link::link!("c" "C" fn clock_gettime(__clock_id : super::clockid_t::clockid_t, __tp : *mut super::struct_timespec::timespec) -> i32);
15#[cfg(all(feature = "clockid_t", feature = "struct_timespec", feature = "types"))]
16windows_link::link!("c" "C" fn clock_nanosleep(__clock_id : super::clockid_t::clockid_t, __flags : i32, __req : *const super::struct_timespec::timespec, __rem : *mut super::struct_timespec::timespec) -> i32);
17#[cfg(all(feature = "clockid_t", feature = "struct_timespec", feature = "types"))]
18windows_link::link!("c" "C" fn clock_settime(__clock_id : super::clockid_t::clockid_t, __tp : *const super::struct_timespec::timespec) -> i32);
19#[cfg(all(feature = "time_t", feature = "types"))]
20windows_link::link!("c" "C" fn ctime(__timer : *const super::time_t::time_t) -> *mut i8);
21#[cfg(all(feature = "time_t", feature = "types"))]
22windows_link::link!("c" "C" fn ctime_r(__timer : *const super::time_t::time_t, __buf : *mut i8) -> *mut i8);
23#[cfg(all(feature = "time_t", feature = "types"))]
24windows_link::link!("c" "C" fn difftime(__time1 : super::time_t::time_t, __time0 : super::time_t::time_t) -> f64);
25windows_link::link!("c" "C" fn dysize(__year : i32) -> i32);
26#[cfg(all(feature = "struct_timeval", feature = "types"))]
27windows_link::link!("c" "C" fn futimes(__fd : i32, __tvp : *mut super::struct_timeval::timeval) -> i32);
28#[cfg(all(feature = "struct_timeval", feature = "types"))]
29windows_link::link!("c" "C" fn getitimer(__which : __itimer_which_t, __value : *mut itimerval) -> i32);
30#[cfg(all(feature = "struct_timeval", feature = "types"))]
31windows_link::link!("c" "C" fn gettimeofday(__tv : *mut super::struct_timeval::timeval, __tz : *mut core::ffi::c_void) -> i32);
32#[cfg(all(feature = "struct_tm", feature = "time_t", feature = "types"))]
33windows_link::link!("c" "C" fn gmtime(__timer : *const super::time_t::time_t) -> *mut super::struct_tm::tm);
34#[cfg(all(feature = "struct_tm", feature = "time_t", feature = "types"))]
35windows_link::link!("c" "C" fn gmtime_r(__timer : *const super::time_t::time_t, __tp : *mut super::struct_tm::tm) -> *mut super::struct_tm::tm);
36#[cfg(all(feature = "struct_tm", feature = "time_t", feature = "types"))]
37windows_link::link!("c" "C" fn localtime(__timer : *const super::time_t::time_t) -> *mut super::struct_tm::tm);
38#[cfg(all(feature = "struct_tm", feature = "time_t", feature = "types"))]
39windows_link::link!("c" "C" fn localtime_r(__timer : *const super::time_t::time_t, __tp : *mut super::struct_tm::tm) -> *mut super::struct_tm::tm);
40#[cfg(all(feature = "struct_timeval", feature = "types"))]
41windows_link::link!("c" "C" fn lutimes(__file : *const i8, __tvp : *mut super::struct_timeval::timeval) -> i32);
42#[cfg(all(feature = "struct_tm", feature = "time_t", feature = "types"))]
43windows_link::link!("c" "C" fn mktime(__tp : *mut super::struct_tm::tm) -> super::time_t::time_t);
44#[cfg(all(feature = "struct_timespec", feature = "types"))]
45windows_link::link!("c" "C" fn nanosleep(__requested_time : *const super::struct_timespec::timespec, __remaining : *mut super::struct_timespec::timespec) -> i32);
46#[cfg(all(feature = "struct_timeval", feature = "types"))]
47windows_link::link!("c" "C" fn setitimer(__which : __itimer_which_t, __new : *const itimerval, __old : *mut itimerval) -> i32);
48#[cfg(all(feature = "struct_timeval", feature = "types"))]
49windows_link::link!("c" "C" fn settimeofday(__tv : *const super::struct_timeval::timeval, __tz : *const timezone) -> i32);
50#[cfg(feature = "struct_tm")]
51windows_link::link!("c" "C" fn strftime(__s : *mut i8, __maxsize : usize, __format : *const i8, __tp : *const super::struct_tm::tm) -> usize);
52#[cfg(all(feature = "__locale_t", feature = "locale_t", feature = "struct_tm"))]
53windows_link::link!("c" "C" fn strftime_l(__s : *mut i8, __maxsize : usize, __format : *const i8, __tp : *const super::struct_tm::tm, __loc : super::locale_t::locale_t) -> usize);
54#[cfg(all(feature = "time_t", feature = "types"))]
55windows_link::link!("c" "C" fn time(__timer : *mut super::time_t::time_t) -> super::time_t::time_t);
56#[cfg(all(feature = "struct_tm", feature = "time_t", feature = "types"))]
57windows_link::link!("c" "C" fn timegm(__tp : *mut super::struct_tm::tm) -> super::time_t::time_t);
58#[cfg(all(feature = "struct_tm", feature = "time_t", feature = "types"))]
59windows_link::link!("c" "C" fn timelocal(__tp : *mut super::struct_tm::tm) -> super::time_t::time_t);
60#[cfg(all(
61    feature = "__sigval_t",
62    feature = "clockid_t",
63    feature = "pthreadtypes",
64    feature = "sigevent_t",
65    feature = "timer_t",
66    feature = "types"
67))]
68windows_link::link!("c" "C" fn timer_create(__clock_id : super::clockid_t::clockid_t, __evp : *mut super::sigevent_t::sigevent_t, __timerid : *mut super::timer_t::timer_t) -> i32);
69#[cfg(all(feature = "timer_t", feature = "types"))]
70windows_link::link!("c" "C" fn timer_delete(__timerid : super::timer_t::timer_t) -> i32);
71#[cfg(all(feature = "timer_t", feature = "types"))]
72windows_link::link!("c" "C" fn timer_getoverrun(__timerid : super::timer_t::timer_t) -> i32);
73#[cfg(all(
74    feature = "struct_itimerspec",
75    feature = "struct_timespec",
76    feature = "timer_t",
77    feature = "types"
78))]
79windows_link::link!("c" "C" fn timer_gettime(__timerid : super::timer_t::timer_t, __value : *mut super::struct_itimerspec::itimerspec) -> i32);
80#[cfg(all(
81    feature = "struct_itimerspec",
82    feature = "struct_timespec",
83    feature = "timer_t",
84    feature = "types"
85))]
86windows_link::link!("c" "C" fn timer_settime(__timerid : super::timer_t::timer_t, __flags : i32, __value : *const super::struct_itimerspec::itimerspec, __ovalue : *mut super::struct_itimerspec::itimerspec) -> i32);
87#[cfg(all(feature = "struct_timespec", feature = "types"))]
88windows_link::link!("c" "C" fn timespec_get(__ts : *mut super::struct_timespec::timespec, __base : i32) -> i32);
89windows_link::link!("c" "C" fn tzset());
90#[cfg(all(feature = "struct_timeval", feature = "types"))]
91windows_link::link!("c" "C" fn utimes(__file : *const i8, __tvp : *mut super::struct_timeval::timeval) -> i32);
92#[cfg(feature = "types")]
93pub const CLOCKS_PER_SEC: super::types::__clock_t = 1000000;
94pub const CLOCK_BOOTTIME: i32 = 7;
95pub const CLOCK_BOOTTIME_ALARM: i32 = 9;
96pub const CLOCK_MONOTONIC: i32 = 1;
97pub const CLOCK_MONOTONIC_COARSE: i32 = 6;
98pub const CLOCK_MONOTONIC_RAW: i32 = 4;
99pub const CLOCK_PROCESS_CPUTIME_ID: i32 = 2;
100pub const CLOCK_REALTIME: i32 = 0;
101pub const CLOCK_REALTIME_ALARM: i32 = 8;
102pub const CLOCK_REALTIME_COARSE: i32 = 5;
103pub const CLOCK_TAI: i32 = 11;
104pub const CLOCK_THREAD_CPUTIME_ID: i32 = 3;
105pub const ITIMER_PROF: __itimer_which = 2;
106pub const ITIMER_REAL: __itimer_which = 0;
107pub const ITIMER_VIRTUAL: __itimer_which = 1;
108pub const TIMER_ABSTIME: i32 = 1;
109pub const TIME_UTC: i32 = 1;
110pub type __itimer_which = u32;
111pub type __itimer_which_t = i32;
112#[repr(C)]
113#[cfg(all(feature = "struct_timeval", feature = "types"))]
114#[derive(Clone, Copy, Default)]
115pub struct itimerval {
116    pub it_interval: super::struct_timeval::timeval,
117    pub it_value: super::struct_timeval::timeval,
118}
119#[repr(C)]
120#[derive(Clone, Copy, Default)]
121pub struct timezone {
122    pub tz_minuteswest: i32,
123    pub tz_dsttime: i32,
124}