#[repr(transparent)]pub struct DispatchTime(pub u64);Expand description
An abstract representation of time.
Tuple Fields§
§0: u64Implementations§
Source§impl DispatchTime
impl DispatchTime
Sourcepub fn time(self: DispatchTime, delta: i64) -> DispatchTime
pub fn time(self: DispatchTime, delta: i64) -> DispatchTime
Create a dispatch_time_t relative to the current value of the default or wall time clock, or modify an existing dispatch_time_t.
On Apple platforms, the default clock is based on mach_absolute_time().
Parameter when: An optional dispatch_time_t to add nanoseconds to. If DISPATCH_TIME_NOW is
passed, then dispatch_time() will use the default clock (which is based on
mach_absolute_time() on Apple platforms). If DISPATCH_WALLTIME_NOW is used,
dispatch_time() will use the value returned by gettimeofday(3).
dispatch_time(DISPATCH_WALLTIME_NOW, delta) is equivalent to
dispatch_walltime(NULL, delta).
Parameter delta: Nanoseconds to add.
Returns: A new dispatch_time_t.
Sourcepub unsafe fn walltime(when: *const timespec, delta: i64) -> DispatchTime
pub unsafe fn walltime(when: *const timespec, delta: i64) -> DispatchTime
Create a dispatch_time_t using the wall clock.
On Mac OS X the wall clock is based on gettimeofday(3).
Parameter when: A struct timespec to add time to. If NULL is passed, then
dispatch_walltime() will use the result of gettimeofday(3).
dispatch_walltime(NULL, delta) returns the same value as
dispatch_time(DISPATCH_WALLTIME_NOW, delta).
Parameter delta: Nanoseconds to add.
Returns: A new dispatch_time_t.
Source§impl DispatchTime
impl DispatchTime
Trait Implementations§
Source§impl Clone for DispatchTime
impl Clone for DispatchTime
Source§fn clone(&self) -> DispatchTime
fn clone(&self) -> DispatchTime
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DispatchTime
impl Debug for DispatchTime
Source§impl Encode for DispatchTime
Available on crate feature objc2 only.
impl Encode for DispatchTime
objc2 only.Source§impl Ord for DispatchTime
impl Ord for DispatchTime
Source§fn cmp(&self, other: &DispatchTime) -> Ordering
fn cmp(&self, other: &DispatchTime) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DispatchTime
impl PartialEq for DispatchTime
Source§impl PartialOrd for DispatchTime
impl PartialOrd for DispatchTime
Source§impl RefEncode for DispatchTime
Available on crate feature objc2 only.
impl RefEncode for DispatchTime
objc2 only.