Initializes a timer object with the specified invocation object.
- iOS 2.0+
- macOS 10.0+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
The number of seconds between firings of the timer. If
tiis less than or equal to
0, this method chooses the nonnegative value of 0.1 milliseconds instead
The invocation to use when the timer fires. The timer instructs the invocation object to maintain a strong reference to its arguments.
true, the timer will repeatedly reschedule itself until invalidated. If
false, the timer will be invalidated after it fires.
NSTimer object, configured according to the specified parameters.
You must add the new timer to a run loop, using
add(_:. Then, after
ti have elapsed, the timer fires, invoking
invocation. (If the timer is configured to repeat, there is no need to subsequently re-add the timer to the run loop.)