Open Classswift 6.0.3Foundation
Timer
class Timer
class Timer
import Foundation
class NSObject
The root class of most Foundation class hierarchies.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol NSObjectProtocol : AnyObject
The NSObjectProtocol
groups methods that are fundamental to all Foundation objects.
init(fire date: Date, interval: TimeInterval, repeats: Bool, block: @escaping (Timer) -> Void)
Alternative API for timer creation with a block.
convenience init(timeInterval interval: TimeInterval, repeats: Bool, block: @escaping (Timer) -> Void)
Creates and returns a new Timer object initialized with the specified block object.
class func scheduledTimer(withTimeInterval interval: TimeInterval, repeats: Bool, block: @escaping (Timer) -> Void) -> Timer
Alternative API for timer creation with a block.
var fireDate: Date { get set }
var isValid: Bool { get }
var timeInterval: TimeInterval { get }
var tolerance: TimeInterval { get set }
var userInfo: Any? { get }
func fire()
func invalidate()