docs/Protocols/SchedulerType.html
public protocol SchedulerType : ImmediateSchedulerType
Represents an object that schedules units of work.
`
now
`
Swift
var now: RxTime { get }
Current time.
`
scheduleRelative(_:dueTime:action:)
`
Schedules an action to be executed.
Swift
func scheduleRelative<StateType>(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable
| state |
State passed to the action to be executed.
|
| dueTime |
Relative time after which to execute the action.
|
| action |
Action to be executed.
|
The disposable object used to cancel the scheduled action (best effort).
`
schedulePeriodic(_:startAfter:period:action:)
` Default implementation
Schedules a periodic piece of work.
Periodic task will be emulated using recursive scheduling.
Swift
func schedulePeriodic<StateType>(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable
| state |
State passed to the action to be executed.
|
| startAfter |
Period after which initial work should be run.
|
| period |
Period for running the work periodically.
|
| action |
Action to be executed.
|
The disposable object used to cancel the scheduled action (best effort).