Creates a timer and schedules it on the current run loop in the default mode.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
- watchOS 3.0+
The number of seconds between firings of the timer. If
intervalis less than or equal to
0, this method chooses the nonnegative value of
true, the timer will repeatedly reschedule itself until invalidated. If
false, the timer will be invalidated after it fires.
A block to be executed when the timer fires.
The block takes a single
NSTimerparameter and has no return value.
NSTimer object, configured according to the specified parameters.
interval seconds have elapsed, the timer fires, executing