One Logo Pool Ball
Foundation · IOS API REFERENCE

Timer.TimerPublisher

class · iOS 13.0+ · SDK 27.1

final class TimerPublisher

A publisher that repeatedly emits the current date on a given interval.

Members (7)

get · iOS 13.0+

mode

TypeScript
get mode(): RunLoop_Mode
Swift declaration
final let mode: RunLoop.Mode
method · iOS 13.0+

connect

TypeScript
connect(): SDKHandle
Swift declaration
final func connect() -> any Cancellable

Connects to the publisher, allowing it to produce elements, and returns an instance with which to cancel publishing. - Returns: A ``Cancellable`` instance that you use to cancel publishing.

get · iOS 13.0+

options

TypeScript
get options(): (RunLoop_SchedulerOptions) | null
Swift declaration
final let options: RunLoop.SchedulerOptions?
get · iOS 13.0+

runLoop

TypeScript
get runLoop(): RunLoop
Swift declaration
final let runLoop: RunLoop
init · iOS 13.0+

init

TypeScript
static init(interval: number, tolerance: (number) | null, runLoop: RunLoop, mode: RunLoop_Mode, options?: (RunLoop_SchedulerOptions) | null): Timer_TimerPublisher
Swift declaration
init(interval: TimeInterval, tolerance: TimeInterval? = nil, runLoop: RunLoop, mode: RunLoop.Mode, options: RunLoop.SchedulerOptions? = nil)

Creates a publisher that repeatedly emits the current date on the given interval. - Parameters: - interval: The interval on which to publish events. - tolerance: The allowed timing variance when emitting events. Defaults to `nil`, which allows any variance. - runLoop: The run loop on which the timer runs. - mode: The run loop mode in which to run the timer. - options: Scheduler options passed to the timer. Defaults to `nil`.

get · iOS 13.0+

interval

TypeScript
get interval(): number
Swift declaration
final let interval: TimeInterval
get · iOS 13.0+

tolerance

TypeScript
get tolerance(): (number) | null
Swift declaration
final let tolerance: TimeInterval?

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

Timer.TimerPublisher.receive(subscriber:)

This declaration needs Swift generic type arguments. (no canonical witness for S)

All Foundation types →