Home
last modified time | relevance | path

Searched refs:ClockId (Results 1 – 25 of 28) sorted by relevance

12

/third_party/rust/crates/nix/src/
Dtime.rs20 pub struct ClockId(clockid_t); struct
22 impl ClockId { implementation
25 ClockId(clk_id) in from_raw()
80 pub const CLOCK_BOOTTIME: ClockId = ClockId(libc::CLOCK_BOOTTIME);
88 pub const CLOCK_BOOTTIME_ALARM: ClockId =
89 ClockId(libc::CLOCK_BOOTTIME_ALARM);
90 pub const CLOCK_MONOTONIC: ClockId = ClockId(libc::CLOCK_MONOTONIC);
98 pub const CLOCK_MONOTONIC_COARSE: ClockId =
99 ClockId(libc::CLOCK_MONOTONIC_COARSE);
102 pub const CLOCK_MONOTONIC_FAST: ClockId =
[all …]
/third_party/rust/crates/rustix/tests/thread/
Dclocks.rs12 use rustix::thread::{clock_nanosleep_absolute, clock_nanosleep_relative, ClockId};
66 ClockId::Monotonic, in test_invalid_nanosleep_absolute()
76 ClockId::Monotonic, in test_invalid_nanosleep_absolute()
86 ClockId::Monotonic, in test_invalid_nanosleep_absolute()
96 ClockId::Monotonic, in test_invalid_nanosleep_absolute()
121 ClockId::Monotonic, in test_invalid_nanosleep_relative()
131 ClockId::Monotonic, in test_invalid_nanosleep_relative()
141 ClockId::Monotonic, in test_invalid_nanosleep_relative()
151 ClockId::Monotonic, in test_invalid_nanosleep_relative()
188 ClockId::Monotonic, in test_zero_nanosleep_absolute()
[all …]
/third_party/rust/crates/rustix/tests/time/
Dmonotonic.rs3 use rustix::time::{clock_gettime, ClockId, Timespec};
9 let a = clock_gettime(ClockId::Monotonic); in test_monotonic_clock()
10 let b = clock_gettime(ClockId::Monotonic); in test_monotonic_clock()
23 let a = clock_gettime(ClockId::Monotonic); in test_monotonic_clock_with_sleep_1s()
28 let b = clock_gettime(ClockId::Monotonic); in test_monotonic_clock_with_sleep_1s()
37 let a = clock_gettime(ClockId::Monotonic); in test_monotonic_clock_with_sleep_1ms()
42 let b = clock_gettime(ClockId::Monotonic); in test_monotonic_clock_with_sleep_1ms()
Ddynamic_clocks.rs4 use rustix::time::{clock_gettime_dynamic, ClockId, DynamicClockId};
8 clock_gettime_dynamic(DynamicClockId::Known(ClockId::Realtime)).unwrap(); in test_known_clocks()
9 clock_gettime_dynamic(DynamicClockId::Known(ClockId::Monotonic)).unwrap(); in test_known_clocks()
/third_party/rust/crates/nix/test/
Dtest_time.rs9 use nix::time::{clock_gettime, ClockId};
14 nix::time::clock_getres(ClockId::CLOCK_REALTIME).expect("assertion failed"); in test_clock_getres()
19 clock_gettime(ClockId::CLOCK_REALTIME).expect("assertion failed"); in test_clock_gettime()
38 ClockId::CLOCK_REALTIME.res().unwrap(); in test_clock_id_res()
43 ClockId::CLOCK_REALTIME.now().unwrap(); in test_clock_id_now()
55 ClockId::pid_cpu_clock_id(nix::unistd::Pid::this()) in test_clock_id_pid_cpu_clock_id()
56 .map(ClockId::now) in test_clock_id_pid_cpu_clock_id()
Dtest_timer.rs6 use nix::time::ClockId;
46 let clockid = ClockId::CLOCK_MONOTONIC; in alarm_fires()
/third_party/rust/crates/nix/test/sys/
Dtest_timerfd.rs3 ClockId, Expiration, TimerFd, TimerFlags, TimerSetTimeFlags,
10 TimerFd::new(ClockId::CLOCK_MONOTONIC, TimerFlags::empty()).unwrap(); in test_timerfd_oneshot()
30 TimerFd::new(ClockId::CLOCK_MONOTONIC, TimerFlags::empty()).unwrap(); in test_timerfd_interval()
57 TimerFd::new(ClockId::CLOCK_MONOTONIC, TimerFlags::empty()).unwrap(); in test_timerfd_unset()
Dtest_socket.rs121 ::nix::time::clock_gettime(::nix::time::ClockId::CLOCK_REALTIME) in test_timestamping()
2585 use nix::time::{clock_gettime, ClockId}; in test_txtime()
2617 let now = clock_gettime(ClockId::CLOCK_MONOTONIC).unwrap(); in test_txtime()
/third_party/rust/crates/rustix/src/time/
Dclock.rs7 pub use backend::time::types::{ClockId, DynamicClockId};
20 pub fn clock_getres(id: ClockId) -> Timespec { in clock_getres()
40 pub fn clock_gettime(id: ClockId) -> Timespec { in clock_gettime()
Dmod.rs13 pub use clock::{clock_gettime, clock_gettime_dynamic, ClockId, DynamicClockId};
/third_party/rust/crates/rustix/src/thread/
Dclock.rs15 pub use backend::time::types::ClockId;
41 pub fn clock_nanosleep_relative(id: ClockId, request: &Timespec) -> NanosleepRelativeResult { in clock_nanosleep_relative() argument
69 pub fn clock_nanosleep_absolute(id: ClockId, request: &Timespec) -> io::Result<()> { in clock_nanosleep_absolute() argument
Dmod.rs25 pub use clock::{clock_nanosleep_absolute, clock_nanosleep_relative, ClockId};
/third_party/rust/crates/rustix/src/backend/linux_raw/thread/
Dsyscalls.rs16 use crate::thread::{ClockId, FutexFlags, FutexOperation, NanosleepRelativeResult, Timespec};
26 id: ClockId, in clock_nanosleep_relative() argument
72 id: ClockId, in clock_nanosleep_relative_old() argument
101 pub(crate) fn clock_nanosleep_absolute(id: ClockId, req: &__kernel_timespec) -> io::Result<()> { in clock_nanosleep_absolute() argument
134 unsafe fn clock_nanosleep_absolute_old(id: ClockId, req: &__kernel_timespec) -> io::Result<()> { in clock_nanosleep_absolute_old() argument
155 ClockId::Realtime, in nanosleep()
/third_party/rust/crates/rustix/examples/
Dtime.rs9 rustix::time::clock_gettime(rustix::time::ClockId::Realtime) in main()
13 rustix::time::clock_gettime(rustix::time::ClockId::Monotonic) in main()
/third_party/rust/crates/rustix/src/backend/libc/thread/
Dsyscalls.rs27 use {crate::thread::ClockId, core::ptr::null_mut};
52 pub(crate) fn clock_nanosleep_relative(id: ClockId, request: &Timespec) -> NanosleepRelativeResult { in clock_nanosleep_relative() argument
101 unsafe fn clock_nanosleep_relative_old(id: ClockId, request: &Timespec) -> NanosleepRelativeResult { in clock_nanosleep_relative_old() argument
146 pub(crate) fn clock_nanosleep_absolute(id: ClockId, request: &Timespec) -> io::Result<()> { in clock_nanosleep_absolute() argument
188 fn clock_nanosleep_absolute_old(id: ClockId, request: &Timespec) -> io::Result<()> { in clock_nanosleep_absolute_old() argument
/third_party/rust/crates/rustix/src/backend/libc/time/
Dsyscalls.rs11 use super::types::{ClockId, DynamicClockId};
48 pub(crate) fn clock_getres(id: ClockId) -> Timespec { in clock_getres()
82 unsafe fn clock_getres_old(id: ClockId) -> Timespec { in clock_getres_old()
99 pub(crate) fn clock_gettime(id: ClockId) -> Timespec { in clock_gettime()
138 unsafe fn clock_gettime_old(id: ClockId) -> Timespec { in clock_gettime_old()
Dtypes.rs122 pub enum ClockId { enum
172 pub enum ClockId { enum
198 Known(ClockId),
/third_party/rust/crates/rustix/src/backend/linux_raw/time/
Dtypes.rs32 pub enum ClockId { enum
66 Known(ClockId),
Dsyscalls.rs12 use super::types::ClockId;
33 pub(crate) fn clock_getres(which_clock: ClockId) -> __kernel_timespec { in clock_getres()
54 unsafe fn clock_getres_old(which_clock: ClockId, result: &mut MaybeUninit<__kernel_timespec>) { in clock_getres_old() argument
/third_party/rust/crates/nix/src/sys/
Dtimer.rs61 use crate::time::ClockId;
74 pub fn new(clockid: ClockId, mut sigevent: SigEvent) -> Result<Self> { in new() argument
Dtimerfd.rs62 pub enum ClockId {
96 pub fn new(clockid: ClockId, flags: TimerFlags) -> Result<Self> { in new() argument
/third_party/rust/crates/rustix/benches/
Dmod.rs105 use rustix::time::{clock_gettime, ClockId}; in simple_clock_gettime()
109 let _ = clock_gettime(ClockId::Monotonic); in simple_clock_gettime()
/third_party/rust/crates/rustix/src/backend/linux_raw/
Dvdso_wrappers.rs15 use super::time::types::{ClockId, DynamicClockId, Timespec};
29 pub(crate) fn clock_gettime(which_clock: ClockId) -> __kernel_timespec { in clock_gettime()
Dconv.rs30 use super::time::types::ClockId;
271 impl<'a, Num: ArgNumber> From<ClockId> for ArgReg<'a, Num> {
273 fn from(i: ClockId) -> Self { in from()
/third_party/rust/crates/libc/src/unix/nto/
Dneutrino.rs1274 pub fn ClockId(__pid: ::pid_t, __tid: ::c_int) -> ::c_int; in ClockId() function

12