Structure

RunLoop.SchedulerTimeType

The scheduler time type used by the run loop.

Declaration

struct SchedulerTimeType, Codable, Hashable

Topics

Creating Scheduler Times

init(Date)

Initializes a run loop scheduler time with the given date.

Working with Scheduler Time Intervals

struct RunLoop.SchedulerTimeType.Stride

The interval by which run loop times advance.

func advanced(by: RunLoop.SchedulerTimeType.Stride) -> RunLoop.SchedulerTimeType

Returns a run loop scheduler time calculated by advancing this instance’s time by the given interval.

func distance(to: RunLoop.SchedulerTimeType) -> RunLoop.SchedulerTimeType.Stride

Returns the distance to another run loop scheduler time.

Inspecting Properties

var date: Date

The date represented by this type.

Creating Ranges

Comparing Scheduler Times

static func < (RunLoop.SchedulerTimeType, RunLoop.SchedulerTimeType) -> Bool

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

static func <= (RunLoop.SchedulerTimeType, RunLoop.SchedulerTimeType) -> 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 == (RunLoop.SchedulerTimeType, RunLoop.SchedulerTimeType) -> Bool

Returns a Boolean value indicating whether two values are equal.

static func > (RunLoop.SchedulerTimeType, RunLoop.SchedulerTimeType) -> Bool

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

static func >= (RunLoop.SchedulerTimeType, RunLoop.SchedulerTimeType) -> 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

See Also

Scheduling Combine Publishers

func schedule(options: RunLoop.SchedulerOptions?, () -> Void)

Performs the action at some time after the specified date, using the scheduler’s minimum tolerance.

func schedule(after: RunLoop.SchedulerTimeType, tolerance: RunLoop.SchedulerTimeType.Stride, options: RunLoop.SchedulerOptions?, () -> Void)

Performs the action at some time after the specified date, using the specified tolerance and options.

var minimumTolerance: RunLoop.SchedulerTimeType.Stride

The minimum tolerance allowed by the run loop scheduler.

var now: RunLoop.SchedulerTimeType

The run loop scheduler’s definition of the current moment in time.

struct RunLoop.SchedulerOptions

A set of options that affect the operation of the run loop scheduler.