Creates a new dispatch source object for monitoring timer events.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
Additional flags indicating the behavior of the timer. For a list of possible values, see
Source .Timer Flags
The dispatch queue to which to execute the installed handlers.
A dispatch source object that conforms to the
After creating the dispatch source, use the methods of the
Dispatch protocol to install the event handlers you need. The returned dispatch source is in the inactive state initially. When you are ready to begin processing events, call its
To schedule timers, use the methods of the
Dispatch protocol. You may schedule timers that fire once or fire multiple times. Each time the timer fires, the dispatch source calls your installed event handler.