Structure

DispatchQueue.SchedulerTimeType.Stride

The increment by which the dispatch queue scheduler counts time.

Declaration

Topics

Creating Scheduler Time Strides

init(DispatchTimeInterval)

Creates a dispatch queue scheduler time interval from the given dispatch time interval.

init?<T>(exactly: T)

Creates a dispatch queue scheduler time interval from a binary integer type.

init(floatLiteral: Double)

Creates a dispatch queue scheduler time interval from a floating-point seconds value.

init(integerLiteral: Int)

Creates a dispatch queue scheduler time interval from an integer seconds value.

Converting to Seconds

static func microseconds(Int) -> DispatchQueue.SchedulerTimeType.Stride

Converts the specified number of microseconds into an instance of this scheduler time type.

static func milliseconds(Int) -> DispatchQueue.SchedulerTimeType.Stride

Converts the specified number of milliseconds into an instance of this scheduler time type.

static func nanoseconds(Int) -> DispatchQueue.SchedulerTimeType.Stride

Converts the specified number of nanoseconds into an instance of this scheduler time type.

static func seconds(Double) -> DispatchQueue.SchedulerTimeType.Stride

Converts the specified number of seconds, as a floating-point value, into an instance of this scheduler time type.

static func seconds(Int) -> DispatchQueue.SchedulerTimeType.Stride

Converts the specified number of seconds into an instance of this scheduler time type.

Expressing Numeric Types

typealias DispatchQueue.SchedulerTimeType.Stride.FloatLiteralType

The type used when evaluating floating-point literals.

typealias DispatchQueue.SchedulerTimeType.Stride.IntegerLiteralType

The type used when evaluating integer literals.

typealias DispatchQueue.SchedulerTimeType.Stride.Magnitude

The type used for expressing the stride’s magnitude.

Inspecting Stride Properties

var magnitude: Int

The value of this time interval in seconds.

var timeInterval: DispatchTimeInterval

The value of this time interval in seconds.

Performing Mathmatical Operations

func negate()

Replaces this value with its additive inverse.

static func *= (inout DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride)

Multiplies the values of the two arguments, and assigns the result to the first argument.

static func += (inout DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride)

Adds the values of the two arguments, and assigns the result to the first argument.

static func - (DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride) -> DispatchQueue.SchedulerTimeType.Stride

Returns the result of subtracting the value of the second argument from the value of the first.

static func -= (inout DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride)

Subtracts the value of the second argument from the value of the first, and assigns the result to the first argument.

Comparing Scheduler Time Strides

static func != (DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride) -> Bool

Returns a Boolean value indicating whether two values aren’t equal.

static func < (DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride) -> Bool

Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument.

static func <= (DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride) -> Bool

Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.

static func > (DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride) -> Bool

Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.

static func >= (DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride) -> Bool

Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.

Instance Properties

Relationships

From Protocol