#[repr(C)]pub struct KernelTimespec {
pub tv_sec: i64,
pub tv_nsec: i64,
}Expand description
struct __kernel_timespec — the timeout payload an IORING_OP_TIMEOUT
SQE points at (always 64-bit fields, independent of the C time_t width).
Fields§
§tv_sec: i64§tv_nsec: i64Implementations§
Source§impl KernelTimespec
impl KernelTimespec
Sourcepub fn from_millis(ms: u64) -> KernelTimespec
pub fn from_millis(ms: u64) -> KernelTimespec
A relative timeout of ms milliseconds.
Sourcepub fn from_micros(us: u64) -> KernelTimespec
pub fn from_micros(us: u64) -> KernelTimespec
A relative timeout of us microseconds — for sub-ms nap timers
(io_uring reactor’s bounded nap; the previous thread::sleep
version was wake-deaf and broke -c1 Rust-client latency).
Trait Implementations§
Source§impl Default for KernelTimespec
impl Default for KernelTimespec
Source§fn default() -> KernelTimespec
fn default() -> KernelTimespec
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KernelTimespec
impl RefUnwindSafe for KernelTimespec
impl Send for KernelTimespec
impl Sync for KernelTimespec
impl Unpin for KernelTimespec
impl UnsafeUnpin for KernelTimespec
impl UnwindSafe for KernelTimespec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more