#[repr(C)]pub struct cp_time {
pub cp_mach_abs_time: u64,
}Available on crate feature
cp_types only.Expand description
A Mach absolute time clock value.
Mach absolute time measures the number of ticks that have elapsed since an arbitrary point after system startup. Each value represents a unique point in time during the course of your app’s execution.
See also Apple’s documentation
Fields§
§cp_mach_abs_time: u64Implementations§
Source§impl cp_time
impl cp_time
Sourcepub unsafe fn to_cf_time_interval(time: cp_time_t) -> CFTimeInterval
Available on crate feature objc2-core-foundation only.
pub unsafe fn to_cf_time_interval(time: cp_time_t) -> CFTimeInterval
objc2-core-foundation only.Converts a Mach absolute time value to a Core Foundation time value.
- Parameters:
- time: The time value to convert.
- Returns: The elapsed time in seconds that correspond to the specified time value.
Sourcepub unsafe fn wait_until(time: cp_time_t)
pub unsafe fn wait_until(time: cp_time_t)
Blocks the current thread until the specified time.
- Parameters:
- time: The Mach absolute time at which to wake up the thread.
Trait Implementations§
Source§impl RefEncode for cp_time
impl RefEncode for cp_time
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
impl Copy for cp_time
impl StructuralPartialEq for cp_time
Auto Trait Implementations§
impl Freeze for cp_time
impl RefUnwindSafe for cp_time
impl Send for cp_time
impl Sync for cp_time
impl Unpin for cp_time
impl UnwindSafe for cp_time
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> EncodeArgument for Twhere
T: Encode,
impl<T> EncodeArgument for Twhere
T: Encode,
Source§const ENCODING_ARGUMENT: Encoding = T::ENCODING
const ENCODING_ARGUMENT: Encoding = T::ENCODING
The Objective-C type-encoding for this type.
Source§impl<T> EncodeReturn for Twhere
T: Encode,
impl<T> EncodeReturn for Twhere
T: Encode,
Source§const ENCODING_RETURN: Encoding = T::ENCODING
const ENCODING_RETURN: Encoding = T::ENCODING
The Objective-C type-encoding for this type.