Blocks the current thread until the time specified.
SDKs
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
class func sleep(until date: Date)
Parameters
aDate
The time at which to resume processing.
Discussion
No run loop processing occurs while the thread is blocked.